Skip to content

Latest commit

 

History

History
182 lines (131 loc) · 7.8 KB

ns-ntddk-_file_fs_sector_size_information.md

File metadata and controls

182 lines (131 loc) · 7.8 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NS:ntddk._FILE_FS_SECTOR_SIZE_INFORMATION
_FILE_FS_SECTOR_SIZE_INFORMATION (ntddk.h)
The FILE_FS_SECTOR_SIZE_INFORMATION structure is used to query physical and logical sector size information for a file system volume.
ifsk\file_fs_sector_size_information.htm
ifsk
04/16/2018
FILE_FS_SECTOR_SIZE_INFORMATION structure
*PFILE_FS_SECTOR_SIZE_INFORMATION, FILE_FS_SECTOR_SIZE_INFORMATION, FILE_FS_SECTOR_SIZE_INFORMATION structure [Installable File System Drivers], PFILE_FS_SECTOR_SIZE_INFORMATION, PFILE_FS_SECTOR_SIZE_INFORMATION structure pointer [Installable File System Drivers], SSINFO_FLAGS_ALIGNED_DEVICE, SSINFO_FLAGS_NO_SEEK_PENALTY, SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE, _FILE_FS_SECTOR_SIZE_INFORMATION, ifsk.file_fs_sector_size_information, ntddk/FILE_FS_SECTOR_SIZE_INFORMATION, ntddk/PFILE_FS_SECTOR_SIZE_INFORMATION
ntddk.h
Ntddk.h, Ntifs.h, Fltkernel.h
Windows
This structure is available starting with Windows 7.
Windows
FILE_FS_SECTOR_SIZE_INFORMATION, *PFILE_FS_SECTOR_SIZE_INFORMATION
_FILE_FS_SECTOR_SIZE_INFORMATION
ntddk/_FILE_FS_SECTOR_SIZE_INFORMATION
PFILE_FS_SECTOR_SIZE_INFORMATION
ntddk/PFILE_FS_SECTOR_SIZE_INFORMATION
FILE_FS_SECTOR_SIZE_INFORMATION
ntddk/FILE_FS_SECTOR_SIZE_INFORMATION
APIRef
kbSyntax
HeaderDef
ntddk.h
_FILE_FS_SECTOR_SIZE_INFORMATION
PFILE_FS_SECTOR_SIZE_INFORMATION
FILE_FS_SECTOR_SIZE_INFORMATION

_FILE_FS_SECTOR_SIZE_INFORMATION structure

-description

The FILE_FS_SECTOR_SIZE_INFORMATION structure is used to query physical and logical sector size information for a file system volume.

-struct-fields

-field 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).

-field PhysicalBytesPerSectorForAtomicity

Actual bytes per sector reported by physical storage used for an atomic write.

-field PhysicalBytesPerSectorForPerformance

Bytes per sector reported by physical storage for best performance.

-field FileSystemEffectivePhysicalBytesPerSectorForAtomicity

The portion of PhysicalBytesPerSectorForAtomicity considered as the physical sector size by the file system.

-field Flags

Flags for sector alignment and performance capabilities. This value is a bitwise OR combination of the following:

Value Meaning
SSINFO_FLAGS_ALIGNED_DEVICE
Logical sectors of the storage device are aligned to physical sector boundaries.
SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE
The partition is aligned to physical sector boundaries on the storage device.
SSINFO_FLAGS_NO_SEEK_PENALTY
The storage device has no seek penalty.
SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE
The storage device supports the TRIM operation.

-field 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.

-field 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.
No specific access rights are required to query this information. Thus this information is available as long as the volume is accessed through an open handle to the volume itself, or to a file or directory on the volume.

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.

-see-also

FILE_FS_FULL_SIZE_INFORMATION

FILE_FS_SIZE_INFORMATION

FltQueryVolumeInformation

FsRtlGetSectorSizeInformation

IRP_MJ_QUERY_VOLUME_INFORMATION

ZwQueryVolumeInformationFile