FS_DisconnectResource( PIOREQ pir )
An existing network connection or a mount on a local drive is removed through FS_DisconnectResource.
ir_rh
Supplies handle to resource that is to be disconnected or dismounted.
ir_flags
Supplies flags for the disconnect or dismount operation.
Disconnect Flag Values: | |
Value | Meaning |
DISCONNECT_NORMAL | Normal disconnect operation, complete all pending io operations and disconnect the resource. |
DISCONNECT_NO_IO | Disconnect the resource without doing any io operation. Pending io operations should be discarded. This will typically be called on volumes that have gone away, usually due to user action. |
DISCONNECT_SINGLE | Disconnect this resource alone. There are certain cases where multiple resources can be associated to one another and come and go as a unit. This flag is passed in to prevent all the resources from going away on associated resources. This is typically the case on compressed drives. |
ir_user
Supplies user id for this request.
ir_pid
Supplies process id for this request.
ir_pev
Supplies a pointer to an event handle. This value is a valid pointer if the disconnect function is called at event time. If the function is called during normal application execution time, this pointer will be NULL.
ir_error | Contains status of the operation ( 0 if no error, errorcode otherwise ). |
The IFS Manager will ensure that all files on the resource have been closed before this call is made. The DISCONNECT_NO_IO case is the only situation in which this may not be true. If the DISCONNECT_NO_IO flag is passed in and the FSD has pending io operations on the volume it should return an error back on the disconnect operation so that the IFS manager can notify the user of this situation. Note that this function can be called at event time, FSDs should not make any assumptions about when this function is called.