FSCTL_REQUEST_BATCH_OPLOCK control code
The FSCTL_REQUEST_BATCH_OPLOCK control code requests a batch opportunistic lock (oplock) on a file.
To process this control code, a minifilter calls FltOplockFsctrl with the following parameters. A file system or legacy filter driver calls FsRtlOplockFsctrl.
For more information about opportunistic locking and about the FSCTL_REQUEST_BATCH_OPLOCK control code, see the Microsoft Windows SDK documentation.
Parameters
Oplock: Opaque oplock object pointer for the file.
CallbackData: FltOplockFsctrl only. Callback data (FLT_CALLBACK_DATA) structure for an IRP_MJ_FILE_SYSTEM_CONTROL FSCTL request. The FsControlCode parameter for the operation must be FSCTL_REQUEST_BATCH_OPLOCK.
Irp: FsRtlOplockFsctrl only. IRP for an IRP_MJ_FILE_SYSTEM_CONTROL FSCTL request. The FsControlCode parameter for the operation must be FSCTL_REQUEST_BATCH_OPLOCK.
OpenCount: Number of user handles for the file.
Status block
FltOplockFsctrl returns FLT_PREOP_PENDING for this operation if the oplock was granted. Otherwise, it returns FLT_PREOP_COMPLETE.
FsRtlOplockFsctrl returns one of the following NTSTATUS values for this operation:
Code | Meaning |
---|---|
STATUS_PENDING | The oplock was granted. This is a success code. |
STATUS_CANCELLED | The IRP was canceled before the FSCTL_REQUEST_BATCH_OPLOCK operation was completed. This is an error code. |
STATUS_OPLOCK_NOT_GRANTED | The oplock could not be granted. This is an error code. |
Requirements
Requirement type | Requirement |
---|---|
Header | Ntifs.h (include Ntifs.h or Fltkernel.h) |
See also
FLT_PARAMETERS for IRP_MJ_FILE_SYSTEM_CONTROL
FSCTL_OPBATCH_ACK_CLOSE_PENDING