Partager via


2.5.7 FileFsSectorSizeInformation

This information class is used to query for the extended sector size and alignment information for a volume. The message contains a FILE_FS_SECTOR_SIZE_INFORMATION data element.<164>

A FILE_FS_SECTOR_SIZE_INFORMATION data element, defined as follows, is returned to the caller.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

LogicalBytesPerSector

PhysicalBytesPerSectorForAtomicity

PhysicalBytesPerSectorForPerformance

FileSystemEffectivePhysicalBytesPerSectorForAtomicity

Flags

ByteOffsetForSectorAlignment

ByteOffsetForPartitionAlignment

LogicalBytesPerSector (4 bytes): A 32-bit unsigned integer that contains the number of bytes in a logical sector for the device backing the volume. This field is the unit of logical addressing for the device and is not the unit of atomic write. Applications SHOULD NOT utilize this value for operations requiring physical sector alignment.

PhysicalBytesPerSectorForAtomicity (4 bytes): A 32-bit unsigned integer that contains the number of bytes in a physical sector for the device backing the volume. Note that this is the reported physical sector size of the device and is the unit of atomic write. Applications SHOULD<165> utilize this value for operations requiring sector alignment.

PhysicalBytesPerSectorForPerformance (4 bytes): A 32-bit unsigned integer that contains the number of bytes in a physical sector for the device backing the volume. This is the reported physical sector size of the device and is the unit of performance. Applications SHOULD<166> utilize this value for operations requiring sector alignment.

FileSystemEffectivePhysicalBytesPerSectorForAtomicity (4 bytes): A 32-bit unsigned integer containing the unit, in bytes, that the file system on the volume will use for internal operations that require alignment and atomicity.<167>

Flags (4 bytes): A 32-bit unsigned integer that indicates the flags for this operation. Currently defined flags are:

Value

Meaning

SSINFO_FLAGS_ALIGNED_DEVICE

0x00000001

When set, this flag indicates that the first physical sector of the device is aligned with the first logical sector. When not set, the first physical sector of the device is misaligned with the first logical sector.

SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE

0x00000002

When set, this flag indicates that the partition is aligned to physical sector boundaries on the storage device.

SSINFO_FLAGS_NO_SEEK_PENALTY

0x00000004

When set, the device reports that it does not incur a seek penalty (this typically indicates that the device does not have rotating media, such as flash-based disks).

SSINFO_FLAGS_TRIM_ENABLED

0x00000008

When set, the device supports TRIM operations, either T13 (ATA) TRIM or T10 (SCSI/SAS) UNMAP.

ByteOffsetForSectorAlignment (4 bytes): A 32-bit unsigned integer that contains the logical sector offset within the first physical sector where the first logical sector is placed, in bytes. If this value is set to SSINFO_OFFSET_UNKNOWN (0XFFFFFFFF), there was insufficient information to compute this field.<168>

ByteOffsetForPartitionAlignment (4 bytes): A 32-bit unsigned integer that contains the byte offset from the first physical sector where the first partition is placed. If this value is set to SSINFO_OFFSET_UNKNOWN (0XFFFFFFFF), there was either insufficient information or an error was encountered in computing this field.

This operation returns a status code as specified in section 2.2. Upon success, the status code returned by the function that processes this file system information class is STATUS_SUCCESS. The most common error codes are listed in the following table.

Error Code

Meaning

STATUS_INFO_LENGTH_MISMATCH

0xC0000004

The specified information record length does not match the length that is required for the specified information class.