Bewerken

Delen via


DEVICE_LB_PROVISIONING_DESCRIPTOR structure (ntddstor.h)

The DEVICE_LB_PROVISIONING_DESCRIPTOR structure is one of the query result structures returned from an IOCTL_STORAGE_QUERY_PROPERTY request. This structure contains the thin provisioning capabilities for a storage device.

Syntax

typedef struct _DEVICE_LB_PROVISIONING_DESCRIPTOR {
  ULONG     Version;
  ULONG     Size;
  UCHAR     ThinProvisioningEnabled : 1;
  UCHAR     ThinProvisioningReadZeros : 1;
  UCHAR     AnchorSupported : 3;
  UCHAR     UnmapGranularityAlignmentValid : 1;
  UCHAR     GetFreeSpaceSupported : 1;
  UCHAR     MapSupported : 1;
  UCHAR     Reserved1[7];
  ULONGLONG OptimalUnmapGranularity;
  ULONGLONG UnmapGranularityAlignment;
  ULONG     MaxUnmapLbaCount;
  ULONG     MaxUnmapBlockDescriptorCount;
} DEVICE_LB_PROVISIONING_DESCRIPTOR, *PDEVICE_LB_PROVISIONING_DESCRIPTOR;

Members

Version

The version of this structure.

Size

The size of this structure. This is set to sizeof(DEVICE_LB_PROVISIONING_DESCRIPTOR).

ThinProvisioningEnabled

The thin provisioning–enabled status.

Value Meaning
0 Thin provisioning is disabled.
1 Thin provisioning is enabled.

ThinProvisioningReadZeros

Reads to unmapped regions return zeros.

Value Meaning
0 Data read from unmapped regions is undefined.
1 Reads return zeros.

AnchorSupported

Support for the anchored LBA mapping state.

Value Meaning
0 The anchored LBA mapping state is not supported.
1 The anchored LBA mapping state is supported.

UnmapGranularityAlignmentValid

The validity of unmap granularity alignment for the device.

Value Meaning
0 Unmap granularity alignment is not valid.
1 Unmap granularity alignment is valid.

GetFreeSpaceSupported

Indicates support for DeviceDsmAction_GetFreeSpace.

Value Meaning
0 DeviceDsmAction_GetFreeSpace is not supported.
1 DeviceDsmAction_GetFreeSpace is supported.

MapSupported

Indicates support for DeviceDsmAction_Map.

Value Meaning
0 DeviceDsmAction_Map is not supported.
1 DeviceDsmAction_Map is supported.

Reserved1[7]

Reserved; do not use.

OptimalUnmapGranularity

The optimal number of blocks for unmap granularity for the device.

UnmapGranularityAlignment

The current value, in blocks, set for unmap granularity alignment on the device. The value UnmapGranularityAlignmentValid indicates the validity of this member.

MaxUnmapLbaCount

Maximum amount of LBAs that can be unmapped in a single UNMAP command, in units of logical blocks. Valid starting in Windows 10.

MaxUnmapBlockDescriptorCount

Maximum number of descriptors allowed in a single UNMAP command. Valid starting in Windows 10.

Remarks

This structure is returned in the system buffer from a IOCTL_STORAGE_QUERY_PROPERTY request when the PropertyId member of STORAGE_PROPERTY_QUERY is set to StorageDeviceLBProvisioningProperty.

The DEVICE_LB_PROVISIONING_DESCRIPTOR structure is written to the system buffer, Irp->AssociatedIrp.SystemBuffer, with a value of sizeof(DEVICE_LB_PROVISIONING_DESCRIPTOR) set in Parameters.DeviceIoControl.OutputBufferLength for the current IRP stack location.

If UnmapGranularityAlignmentValid is 0, then any code using UnmapGranularityAlignment should assume it has a value of 0.

If the underlying storage device is a SCSI device, unmapping capability can be queried. If the TrimEnabled member of the DEVICE_TRIM_DESCRIPTOR structure is TRUE, UNMAP is supported. The DEVICE_TRIM_DESCRIPTOR structure is returned in the system buffer from a IOCTL_STORAGE_QUERY_PROPERTY request when the PropertyId member of STORAGE_PROPERTY_QUERY is set to StorageDeviceTrimProperty.

Requirements

Requirement Value
Minimum supported client Windows 8
Header ntddstor.h (include Ntddstor.h)

See also

IOCTL_STORAGE_QUERY_PROPERTY

STORAGE_PROPERTY_QUERY