Bewerken

Delen via


FsRtlGetSectorSizeInformation function (ntifs.h)

The FsRtlGetSectorSizeInformation routine retrieves the physical and logical sector size information for a storage volume.

Syntax

NTSTATUS FsRtlGetSectorSizeInformation(
        PDEVICE_OBJECT                   DeviceObject,
  [out] PFILE_FS_SECTOR_SIZE_INFORMATION SectorSizeInfo
);

Parameters

DeviceObject

The target device object for a storage device.

[out] SectorSizeInfo

A pointer to a caller supplied FILE_FS_SECTOR_SIZE_INFORMATION structure.

Return value

FsRtlGetSectorSizeInformation returns STATUS_SUCCESS if the sector size information is returned in SectorSizeInfo. Otherwise, another appropriate NTSTATUS value is returned such as the following.

Return code Description
STATUS_BAD_DEVICE_TYPE
The storage device reported an invalid sector size.

Remarks

This routine is used by file system drivers to retrieve sector size information from the storage device containing the volume. A file system driver typically maintains the device object sent in RealDevice in its volume parameter block (VPD) for the storage volume.

Drivers other than file system drivers, can query sector size information using the FltQueryVolumeInformation or ZwQueryVolumeInformationFile routines, or by sending an IRP_MJ_QUERY_VOLUME_INFORMATION request and specifying FileFsSectorSizeInformation as the file system information class.

Requirements

Requirement Value
Minimum supported client Available in starting with Windows 8.
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See also

FILE_FS_SECTOR_SIZE_INFORMATION

FltQueryVolumeInformation

IRP_MJ_QUERY_VOLUME_INFORMATION

ZwQueryVolumeInformationFile