Export (0) Print
Expand All

IRP_MJ_SET_QUOTA

When Sent

The IRP_MJ_SET_QUOTA request is sent by the I/O Manager. It can be sent, for example, when a user-mode application has called a Microsoft Win32 method such as IDiskQuotaControl::SetQuotaState.

Operation: File System Drivers

IRP_MJ_SET_QUOTA and IRP_MJ_QUERY_QUOTA existed in Windows NT 4.0 but were not used by file systems. On Windows 2000 and later systems, they are used for disk quota support in NTFS. Support for these IRPs by new file systems is optional.

Operation: File System Filter Drivers

The filter driver should pass this IRP down to the next-lower driver on the stack, unless it needs to explicitly override quota behavior.

Parameters

A file system or filter driver calls IoGetCurrentIrpStackLocation with the given IRP to get a pointer to its own stack location in the IRP, shown in the following list as IrpSp. (The IRP is shown as Irp.) The driver can use the information that is set in the following members of the IRP and the IRP stack location in processing a set quota information request:

DeviceObject

Pointer to the target device object.

DeviceObject->Flags

If the DO_BUFFERED_IO flag is set, the caller has requested METHOD_BUFFERED I/O. Otherwise, the caller has requested METHOD_NEITHER I/O.

Irp->AssociatedIrp.SystemBuffer

Pointer to a system-supplied buffer to be used as an intermediate system buffer, if the DO_BUFFERED_IO flag is set in DeviceObject->Flags. Otherwise, this member is set to NULL.

Irp->IoStatus

Pointer to an IO_STATUS_BLOCK structure that receives the final completion status and information about the requested operation.

Irp->UserBuffer

Pointer to a caller-supplied buffer that contains the quota entries to be added or modified for the volume.

IrpSp->FileObject

Pointer to the file object that is associated with DeviceObject.

The IrpSp->FileObject parameter contains a pointer to the RelatedFileObject field, which is also a FILE_OBECT structure. The RelatedFileObject field of the FILE_OBJECT structure is not valid during the processing of IRP_MJ_SET_QUOTA and should not be used.

IrpSp->MajorFunction

Specifies IRP_MJ_SET_QUOTA.

IrpSp->Parameters.SetQuota.Length

Specifies the length, in bytes, of the buffer pointed to by Irp->UserBuffer.

See also

FILE_QUOTA_INFORMATION
IO_STACK_LOCATION
IO_STATUS_BLOCK
IoCheckQuotaBufferValidity
IoGetCurrentIrpStackLocation
IRP
IRP_MJ_QUERY_QUOTA

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft