FS_MountVolume


FS_MountVolume(
 PIOREQ pir
 )

The linkage between an FSD and a disk volume is established and discontinued through FS_MountVolume.

ir_flags

Supplies mount type to be performed.

Mount Type Values:

One of the following types will be specified.

Value

Meaning

IR_FSD_MOUNT

Mount a disk volume. This usually happens on the first access to the media or if the media is removeable and the volume has changed.

IR_FSD_VERIFY

Verify that the volume mounted has not changed.

IR_FSD_UNLOAD

The disk resource has disappeared, unmount this volume unconditionally.

IR_FSD_MOUNT_CHILD

This volume is a child volume of an already mounted volume. Child volumes are treated as a single unit along with the parent volume. Compressed volumes e.g. DoubleSpace have child volumes or CVFs associated with a parent volume. The FSD should chain all these resources so that when it is called to unmount the parent volume, all the child volumes are also unmounted.

IR_FSD_MAP_DRIVE

Switch the driveletter for the volume. Driveletters are typically switched when mounting compressed media. The FSD should use the new driveletter while referring to this volume.

IR_FSD_UNMAP_DRIVE

Switch the driveletter back to the original drive. When a compressed volume gets unmounted, the driveletter needs to be switched back. The FSD should now use this driveletter to refer to the volume.


Operation Type IR_FSD_MOUNT:

Value

Meaning

ir_volh

Supplies a system volume handle. The system volume handle is used by the IOS to identify a volume and is typically passed down to the IOS by the FSD on an i/o operation.

ir_mntdrv

Drive identifier for the drive to be mounted.

ir_fh

Supplies the IFS resource handle for this volume. This is to be used purely for identification purposes only.

ir_rh

Supplies the linear address of the head of the DOS DPB chain. The ifs manager makes sure that there is a DPB structure corresponding to this drive on this chain. The FSD will need to walk the DPB list to find the DPB for this drive.

Operation Type IR_FSD_VERIFY:

This operation is not called by the IFS manager, the FSD is directly called by the volume tracking driver.

Operation Type IR_FSD_UNLOAD:

This operation is not called by the IFS manager, the FSD is directly called by the volume tracking driver.

Operation Type IR_FSD_MOUNT_CHILD:

Value

Meaning

ir_rh

Supplies the FSD resource handle for the parent volume.

ir_fh

Supplies the IFS resource handle for the parent volume. This is to be used purely for identification purposes only.

ir_volh

Supplies the system volume handle for the parent volume.

ir_mntdrv

Drive identifier for the drive to be mounted.

Operation Type IR_FSD_MAP_DRIVE:

Value

Meaning

ir_rh

Supplies the FSD resource handle for the volume.

ir_options

Supplies the new driveletter for the volume.

ir_fh

Supplies the IFS resource handle for the parent volume. This is to be used purely for identification purposes only.

Operation Type IR_FSD_UNMAP_DRIVE:

This operation is not called by the IFS manager, it is called directly by the driver.

ir_error

Returns status of the operation ( 0 if no error, errorcode otherwise ). There is a special error of ERROR_VOLUME_EXISTS that can be returned by the FSD if it already has a resource mounted on the volume that is valid. Look below for details.


Operation Type IR_FSD_MOUNT, IR_FSD_MOUNT_CHILD:

Value

Meaning

ir_rh

Returns an FSD volume handle to the disk volume for mount on a successful mount.

This handle is used to identify the disk volume and is passed back to the FSD during file operations on the specified disk volume. The value of this handle is not interpreted by the IFS Managers, it is only used to identify the disk volume.

If the special error of ERROR_VOLUME_EXISTS is returned, then this field should contain the previous system volume handle. The IFS manager uses this returned system volume handle to identify the IFS resource handle for this volume.

ir_vfunc

Returns a pointer to a function table, in the FSD, containing a list of the FSD name based file I/O entry points. This field should not be returned if an error status of ERROR_VOLUME_EXISTS is returned.


Function Table Structure:

Value

Meaning

vfn_version

IFS version number.

vfn_revision

IFS interface revision number.

vfn_sizec

Number of function entry points in table.

vfn_func[NUM_VOLFUNC]

Array of pointers to volume-based functions as described below:


Volume Based Functions:

Value

Meaning

vfn_func[VFN_DELETE]

Pointer to FS_DeleteFile function.

vfn_func[VFN_DIR]

Pointer to FS_Dir function.

vfn_func[VFN_FILEATTRIB]

Pointer to FS_FileAttributes function.

vfn_func[VFN_FLUSH]

Pointer to FS_FlushVolume function.

vfn_func[VFN_GETDISKINFO]

Pointer to FS_GetDiskInfo function.

vfn_func[VFN_OPEN]

Pointer to FS_OpenFile function.

vfn_func[VFN_RENAME]

Pointer to FS_RenameFile function.

vfn_func[VFN_SEARCH]

Pointer to FS_SearchFile function.

vfn_func[VFN_QUERY]

Pointer to FS_QueryResourceInfo function.

vfn_func[VFN_DISCONNECT]

Pointer to FS_DisconnectResource function.

vfn_func[VFN_UNCPIPEREQUEST]

Function not defined for volume mounts, FSD must return pointer to error function.

vfn_func[VFN_IOCTL16DRIVE]

Pointer to FS_Ioctl16Drive function.

vfn_func[VFN_GETDISKPARMS]

Pointer to FS_GetDiskParms function.

vfn_func[VFN_FINDOPEN]

Pointer to FS_FindFirstFile function.

vfn_func[VFN_DASDIO]

Pointer to FS_DirectDiskIO function.


ir_tuna

Returns flags about whether FSD wants tunnelling to be done on this volume.


Tunnelling Flag Values:

Value

Meaning

IR_TUNA_NOTUNNEL

No tunnelling should be done on this volume.

IR_TUNA_FSDTUNNEL

The FSD implements tunnelling on its own on this volume.

IR_TUNA_IFSTUNNEL

The IFS must enable its default tunnelling support on this volume.


Operation Type IR_FSD_VERIFY:

This operation is not called by the IFS manager, the FSD is directly called by the volume tracking driver.


Operation Type IR_FSD_UNLOAD:

This operation is not called by the IFS manager, the FSD is directly called by the volume tracking driver.


Operation Type IR_FSD_MAP_DRIVE:

This operation has no other explicit return status.


Operation Type IR_FSD_UNMAP_DRIVE:

This operation is not called by the IFS manager, it is called directly by the driver.


An IR_FSD_MOUNT operation is performed when the disk is initially accessed and when the media has changed. The FSD should examine the disk volume and determine if it recognizes the file system disk format. If the volume is recognized the FSD should save the information it requires about the volume and return a handle for the volume. The IFS manager uses the returned volume handle to indicate to the FSD which disk volume a pathnamed I/O request should be performed on. The volume handle is also used to track the disk volumes that may be in a removable media drive.

The FSD must verify if the disk volume has already been mounted. If it has been previously mounted then the previously returned system volume handle and FSD volume handle should be returned. Otherwise the disk volume will be considered a separate volume.

If the FSD determines that the media is a new volume, the FSD should save the system volume handle and drive identifier. The system volume handle should be used by the FSD during disk I/O requests to identify the disk volume to the I/O system. The drive identifier should be used by the FSD during a mount to verify that a previously mounted volume is on the same drive.