Freigeben über


2.1.5.10.11 FSCTL_GET_NTFS_VOLUME_DATA

The server provides:

  • Open: An Open of a DataFile or DirectoryFile.

  • OutputBufferSize: The maximum number of bytes to return in OutputBuffer.

On completion, the object store MUST return:

  • Status: An NTSTATUS code that specifies the result.

  • OutputBuffer: An array of bytes that will return a NTFS_VOLUME_DATA_BUFFER structure as specified in [MS-FSCC] section 2.3.22.

  • BytesReturned: The number of bytes returned in OutputBuffer.

Support for this operation is optional. If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.<104>

Pseudocode for the operation is as follows:

  • If OutputBufferSize is less than sizeof(NTFS_VOLUME_DATA_BUFFER), the operation MUST be failed with STATUS_BUFFER_TOO_SMALL.

  • The object store MUST populate the fields of OutputBuffer as follows:<105>

    • OutputBuffer.VolumeSerialNumber set to Open.File.Volume.VolumeSerialNumber.

    • OutputBuffer.NumberSectors set to Open.File.Volume.TotalSpace / Open.File.Volume.LogicalBytesPerSector.

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

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

    • OutputBuffer.TotalReserved set to Open.File.Volume.ReservedSpace / Open.File.Volume.ClusterSize.

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

    • OutputBuffer.BytesPerCluster set to Open.File.Volume.ClusterSize.

    • OutputBuffer.BytesPerFileRecordSegment set to an implementation-specific value.

    • OutputBuffer.ClustersPerFileRecordSegment set to an implementation-specific value.

    • OutputBuffer.MftValidDataLength set to an implementation-specific value.

    • OutputBuffer.MftStartLcn set to an implementation-specific value.

    • OutputBuffer.Mft2StartLcn set to an implementation-specific value.

    • OutputBuffer.MftZoneStart set to an implementation-specific value.

    • OutputBuffer.MftZoneEnd set to an implementation-specific value.

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

    • BytesReturned set to sizeof(NTFS_VOLUME_DATA_BUFFER).

    • Status set to STATUS_SUCCESS.