IFSMgr_CheckAccessConflict


IFSMgr_CheckAccessConflict(
 int fSoftCompatibleDisable,
 fmode_t pfmode,
 int (*pfn)( fmode_t *, const void *),
 const void * FSDCookie
 )

This service validates the desired access and sharing mode and determines if it can be granted. The FSD is expected to maintain an open file table and a list of processes currently sharing the file. An enumeration function is passed in as part of the parameters. The FSD's enumeration function is called to enumerate the various instances of the open file. The IFS manager then checks the sharing and access modes for each open instance of the file to see if the desired access and sharing mode can be permitted.

fSoftCompatibleDisable

Supplies a flag to indicate whether "Soft Compatibility" is enabled or not. Soft compatibility is disabled if this flag is set and enabled if the flag is cleared.

pfmode

Supplies a pointer to a fmode_t structure. This structure is described below.

Fmode_t Structure:

fm_uid

This field provides the user id for the process.

fm_cookie0

This is a field that the caller can store anything into. For e.g., this could be a pointer to an open file table structure.

fm_cookie1

This is also a field that the caller can store anything into. For e.g., this could be the pointer to a particular instance of the open file.

fm_mode

This field provides the desired sharing and access mode.

fm_attr

This field provides the attributes of the open file.


pfn

Supplies the pointer to the enumeration function.

FSDCookie

Supplies one of the parameters for the enumeration function.


EnumerateOpenFileInstance(
 fmode_t pfname,
 const void * FSDCookie
 )

The enumeration function described above is called with a pointer to a fmode_t structure that is to be filled in and the FSDCookie parameter that was supplied by the caller. This parameter should contain enough information for the FSD to traverse its list of instances for an open file one by one. For each open instance, the function fills in the fields in the fmode_t structure that was passed in and returns to the IFS manager. The parameters for the enumeration function are described below.

pfname

Supplies a pointer to a fmode_t structure that is to be filled in by the enumeration function as described previously.

FSDCookie

Supplies the caller's passed in parameter.