FILE_FS_SECTOR_SIZE_INFORMATION structure (ntddk.h)
The FILE_FS_SECTOR_SIZE_INFORMATION structure is used to query physical and logical sector size information for a file system volume.
Syntax
typedef struct _FILE_FS_SECTOR_SIZE_INFORMATION {
ULONG LogicalBytesPerSector;
ULONG PhysicalBytesPerSectorForAtomicity;
ULONG PhysicalBytesPerSectorForPerformance;
ULONG FileSystemEffectivePhysicalBytesPerSectorForAtomicity;
ULONG Flags;
ULONG ByteOffsetForSectorAlignment;
ULONG ByteOffsetForPartitionAlignment;
} FILE_FS_SECTOR_SIZE_INFORMATION, *PFILE_FS_SECTOR_SIZE_INFORMATION;
Members
LogicalBytesPerSector
Logical bytes per sector reported by physical storage. This is the same value as the block size for used for Logical Block Addressing (LBA).
PhysicalBytesPerSectorForAtomicity
Actual bytes per sector reported by physical storage used for an atomic write.
PhysicalBytesPerSectorForPerformance
Bytes per sector reported by physical storage for best performance.
FileSystemEffectivePhysicalBytesPerSectorForAtomicity
The portion of PhysicalBytesPerSectorForAtomicity considered as the physical sector size by the file system.
Flags
Flags for sector alignment and performance capabilities. This value is a bitwise OR combination of the following:
ByteOffsetForSectorAlignment
The offset, in bytes, of the beginning of the first logical sector within the first physical sector. This member is set to SSINFO_OFFSET_UNKNOWN if proper device information is not available to calculate the value.
ByteOffsetForPartitionAlignment
The offset value, in bytes, used to align the partition to a physical sector boundary. This member is set to SSINFO_OFFSET_UNKNOWN if proper device information is not available to calculate the value.
Remarks
This information can be queried in either of the following ways:
- Call FltQueryVolumeInformation or ZwQueryVolumeInformationFile, passing FileFsSectorSizeInformation as the value of FileInformationClass and passing a caller-allocated, FILE_FS_SECTOR_SIZE_INFORMATION-structured buffer as the value of FileInformation.
- Create an IRP with major function code IRP_MJ_QUERY_VOLUME_INFORMATION.
- Call FsRtlGetSectorSizeInformation with a pointer to a FILE_FS_SECTOR_SIZE_INFORMATION-structured buffer. The FileSystemEffectivePhysicalBytesPerSectorForAtomicity member will not have a value initialized by the file system when this structure is returned from FsRtlGetSectorSizeInformation. A file system driver will typically call this function and then set its own value for FileSystemEffectivePhysicalBytesPerSectorForAtomicity.
The size of the buffer passed in the FileInformation parameter to FltQueryVolumeInformation or ZwQueryVolumeInformationFile must be at least sizeof (FILE_FS_SECTOR_SIZE_INFORMATION).
The file system uses the value of LogicalBytesPerSector to determine the size of an allocation unit. The LogicalBytesPerSector member of this structure is equivalent to the BytesPerSector member of the FILE_FS_SIZE_INFORMATION and FILE_FS_FULL_SIZE_INFORMATION structures.
If the system is unable to determine values for PhysicalBytesPerSectorForAtomicity and PhysicalBytesPerSectorForPerformance from the storage device, then they are set to the value of LogicalBytesPerSector.
Requirements
Requirement | Value |
---|---|
Minimum supported client | This structure is available starting with Windows 7. |
Header | ntddk.h (include Ntddk.h, Ntifs.h, Fltkernel.h) |