Export (0) Print
Expand All

2.1.5.12.7 FileFsFullSizeInformation

OutputBuffer is of type FILE_FS_FULL_SIZE_INFORMATION, as described in [MS-FSCC] section 2.5.4.

This routine uses the following local variables:

  • 64-bit unsigned integer: RemainingQuota

  • FILE_QUOTA_INFORMATION element: QuotaEntry

Pseudocode for the operation is as follows:

  • If OutputBufferSize is smaller than sizeof(FILE_FS_FULL_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.

  • OutputBuffer MUST be constructed as follows:

    • OutputBuffer.TotalAllocationUnits set to Open.File.Volume.TotalSpace / Open.File.Volume.ClusterSize.

    • OutputBuffer.CallerAvailableAllocationUnits set to Open.File.Volume.FreeSpace / Open.File.Volume.ClusterSize.

    • OutputBuffer.ActualAvailableAllocationUnits set to Open.File.Volume.FreeSpace / Open.File.Volume.ClusterSize.

    • OutputBuffer.SectorsPerAllocationUnit set to Volume.ClusterSize / Open.File.Volume. LogicalBytesPerSector.

    • OutputBuffer.BytesPerSector set to Open.File.Volume. LogicalBytesPerSector.

  • If Open.File.Volume.QuotaInformation contains an entry QuotaEntry that matches the SID of the current Open, the object store MUST modify the returned information based on QuotaEntry as follows:

    • If QuotaEntry.QuotaLimit < Open.File.Volume.TotalSpace:

      • OutputBuffer.TotalAllocationUnits MUST be set to QuotaEntry.QuotaLimit / Open.File.Volume.ClusterSize.

    • EndIf

    • If QuotaEntry.QuotaLimit <= QuotaEntry.QuotaUsed:

      • RemainingQuota MUST be set to 0.

    • Else

      • RemainingQuota MUST be set to QuotaEntry.QuotaLimit - QuotaEntry.QuotaUsed.

    • EndIf

    • If RemainingQuota < Open.File.Volume.FreeSpace:

      • OutputBuffer.CallerAvailableAllocationUnits MUST be set to RemainingQuota / Open.File.Volume.ClusterSize.

    • EndIf

  • EndIf

  • Upon successful completion of the operation, the object store MUST return:

    • ByteCount set to sizeof(FILE_FS_FULL_SIZE_INFORMATION).

    • Status set to STATUS_SUCCESS.

 
Show:
© 2015 Microsoft