Export (0) Print
Expand All

2.1.5.12.10 FileFsSectorSizeInformation

OutputBuffer is of type FILE_FS_SECTOR_SIZE_INFORMATION as defined in [MS-FSCC] section 2.5.7.

Pseudocode for the operation is as follows:

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

  • OutputBuffer MUST be constructed as follows:

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

    • OutputBuffer.PhysicalBytesPerSectorForAtomicity is computed as follows:

      • Set OutputBuffer.PhysicalBytesPerSectorForAtomicity to the physical sector size reported from the storage device underlying the object store.

      • If there was an issue with retrieving the physical sector size information:

        • Set OutputBuffer.PhysicalBytesPerSectorForAtomicity to Open.File.Volume.LogicalBytesPerSector.

      • ElseIf OutputBuffer.PhysicalBytesPerSectorForAtomicity is NOT a power of two, OR

        OutputBuffer.PhysicalBytesPerSectorForAtomicity is less than Open.File.Volume.LogicalBytesPerSector, OR

        OutputBuffer.PhysicalBytesPerSectorForAtomicity is not a multiple of Open.File.Volume.LogicalBytesPerSector:

        • Set OutputBuffer.PhysicalBytesPerSectorForAtomicity to Open.File.Volume.LogicalBytesPerSector.

      • EndIf

    • OutputBuffer.PhysicalBytesPerSectorForPerformance is set to OutputBuffer.PhysicalBytesPerSectorForAtomicity.

    • OutputBuffer.FileSystemEffectivePhysicalBytesPerSectorForAtomicity is computed as follows:

      • If OutputBuffer.PhysicalBytesPerSectorForAtomicity is greater than Open.File.Volume.SystemPageSize:

        • Set OutputBuffer.FileSystemEffectivePhysicalBytesPerSectorForAtomicity to Open.File.Volume.SystemPageSize.

      • Else:

        • Set OutputBuffer.FileSystemEffectivePhysicalBytesPerSectorForAtomicity to OutputBuffer.PhysicalBytesPerSectorForAtomicity.

      • EndIf

    • OutputBuffer.ByteOffsetForSectorAlignment is computed as follows:

      • Set OutputBuffer.ByteOffsetForSectorAlignment to the physical offset alignment reported by the storage device.

      • If there was an issue with retrieving the physical offset alignment:

        • Set OutputBuffer.ByteOffsetForSectorAlignment to SSINFO_OFFSET_UNKNOWN.

      • EndIf

    • OutputBuffer.ByteOffsetForPartitionAlignment is computed as follows:

      • Set OutputBuffer.ByteOffsetForPartitionAlignment to (Open.File.Volume.PartitionOffset % OutputBuffer.PhysicalBytesPerSectorForAtomicity).

    • OutputBuffer.Flags is set as follows:

      • Set SSINFO_FLAGS_ALIGNED_DEVICE, SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE flags in OutputBuffer.Flags.

      • If OutputBuffer.ByteOffsetForSectorAlignment is not zero:

        • Clear SSINFO_FLAGS_ALIGNED_DEVICE flag in OutputBuffer.Flags.

      • EndIf

      • If OutputBuffer.ByteOffsetForSectorAlignment is not equal to ((OutputBuffer.PhysicalBytesPerSectorForAtomicity – OutputBuffer.ByteOffsetForPartitionAlignment) % OutputBuffer.PhysicalBytesPerSectorForAtomicity :

        • Clear SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE flag in OutputBuffer.Flags

      • EndIf

      • Query the storage device underlying the object store to determine if there is a seek penalty. If there is not a seek penalty, set SSINFO_FLAGS_NO_SEEK_PENALTY flag in OutputBuffer.Flags.

      • Query the storage device underlying the object store to determine if either the TRIM (T13-ATA) or UNMAP (T10-SCSI/SAS) commands are supported. If either command is supported, set SSINFO_FLAGS_TRIM_ENABLED flag in OutputBuffer.Flags.

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

    • ByteCount set to the size of the FILE_FS_SECTOR_SIZE_INFORMATION structure

    • Status set to STATUS_SUCCESS.

 
Show:
© 2015 Microsoft