STORAGE_OFFLOAD_TOKEN - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntddstor.h

typedef struct _STORAGE_OFFLOAD_TOKEN {
  UCHAR TokenType[4];
  UCHAR Reserved[2];
  UCHAR TokenIdLength[2];
  union {
    struct {
      UCHAR Reserved2[STORAGE_OFFLOAD_TOKEN_ID_LENGTH];
    } StorageOffloadZeroDataToken;
    UCHAR Token[STORAGE_OFFLOAD_TOKEN_ID_LENGTH];
  } DUMMYUNIONNAME;
} STORAGE_OFFLOAD_TOKEN, *PSTORAGE_OFFLOAD_TOKEN;
View the official Windows Driver Kit DDI reference
// winioctl.h

typedef struct _STORAGE_OFFLOAD_TOKEN {
  BYTE  TokenType[4];
  BYTE  Reserved[2];
  BYTE  TokenIdLength[2];
  union {
    struct {
      BYTE Reserved2[STORAGE_OFFLOAD_TOKEN_ID_LENGTH];
    } StorageOffloadZeroDataToken;
    BYTE Token[STORAGE_OFFLOAD_TOKEN_ID_LENGTH];
  } DUMMYUNIONNAME;
} STORAGE_OFFLOAD_TOKEN, *PSTORAGE_OFFLOAD_TOKEN;
View the official Win32 API reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-ntddstor-_storage_offload_token)

_STORAGE_OFFLOAD_TOKEN structure

Description

The STORAGE_OFFLOAD_TOKEN structure contains a token value that serves as a representation of a data set range within a file on a volume. This structure is used in performing offload reads and writes.

Members

TokenType

The type of token contained in this structure. TokenType is set to either of the following:

Value Meaning
STORAGE_OFFLOAD_TOKEN_TYPE_ZERO_DATA A well-known token format is contained in Token. The token represents data considered as all zeros.
Any other value A vendor-specific token format is contained in Token.

Reserved

Reserved.

TokenIdLength

The length of the token data in Token.

DUMMYUNIONNAME

DUMMYUNIONNAME.StorageOffloadZeroDataToken

The token value when the data it represents is considered as all zeros. This member is valid when TokenType is set to STORAGE_OFFLOAD_TOKEN_TYPE_ZERO_DATA.

DUMMYUNIONNAME.StorageOffloadZeroDataToken.Reserved2

Reserved.

DUMMYUNIONNAME.Token

The vendor-supplied token value representing a data set range for an offload read or write operation.

Remarks

The token information contained in STORAGE_OFFLOAD_TOKEN is generated by the offload read/write infrastructure. All members of this structure should be considered as read only and must not be modified by any callers requesting an offload read or an offload write.

See also

DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS

STORAGE_OFFLOAD_READ_OUTPUT


Win32 API reference (ns-winioctl-storage_offload_token)

STORAGE_OFFLOAD_TOKEN structure

Description

Contains the token used to represent a portion of a file used in by offload read and write operations specified by DeviceDsmAction_OffloadRead or DeviceDsmAction_OffloadWrite actions for the IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES control code.

Members

TokenType

A 32-bit unsigned integer which defines the type of Token.

STORAGE_OFFLOAD_TOKEN_TYPE_WELL_KNOWN (0xFFFFFFFF)

The Token member uses a well-known format. The first two bytes of the Token member are a 16-bit unsigned integer that describes the region. The possible values are either STORAGE_OFFLOAD_PATTERN_ZERO or STORAGE_OFFLOAD_PATTERN_ZERO_WITH_PROTECTION_INFO. STORAGE_OFFLOAD_PATTERN_ZERO (0x0001) is a well-known token that indicates that the region represented has all bits set to zero. STORAGE_OFFLOAD_PATTERN_ZERO_WITH_PROTECTION_INFO is a well-known token that indicates that the data in the region represented has all bits set to zero and the corresponding protection information is valid.

0x00000000–0xFFFFFFFE

The Token member uses a vendor-specific format.

Reserved

Reserved.

TokenIdLength

The length of the token data in Token.

DUMMYUNIONNAME

DUMMYUNIONNAME.StorageOffloadZeroDataToken

DUMMYUNIONNAME.StorageOffloadZeroDataToken.Reserved2

Reserved.

DUMMYUNIONNAME.Token

If the TokenType member is STORAGE_OFFLOAD_TOKEN_TYPE_WELL_KNOWN then the first two bytes are a 16-bit unsigned integer that describes the range. Otherwise this is a vendor-specific format.