Partager via


2.3.20 FSCTL_GET_INTEGRITY_INFORMATION Reply

The FSCTL_GET_INTEGRITY_INFORMATION Reply message returns the results of the FSCTL_GET_INTEGRITY_INFORMATION Request (section 2.3.19) and indicates the current integrity state of the file or directory.

The FSCTL_GET_INTEGRITY_INFORMATION_BUFFER data element is as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

ChecksumAlgorithm

Reserved

Flags

ChecksumChunkSizeInBytes

ClusterSizeInBytes

ChecksumAlgorithm (2 bytes): For ReFS v1, the field MUST be set to one of the following standard values.

Value

Meaning

CHECKSUM_TYPE_NONE

0x0000

The file or directory is not configured to use integrity.

CHECKSUM_TYPE_CRC64

0x0002

The file or directory is configured to use a CRC64 checksum to provide integrity.

All other values

Reserved for future use and MUST NOT be used.

For ReFS v2, the field MUST be set to one of the following standard values.

Value

Meaning

CHECKSUM_TYPE_NONE

0x0000

The file or directory is not configured to use integrity.

CHECKSUM_TYPE_CRC32

0x0001

The file or directory is configured to use a CRC32 checksum to provide integrity.

CHECKSUM_TYPE_CRC64

0x0002

The file or directory is configured to use a CRC64 checksum to provide integrity.

All other values

Reserved for future use and MUST NOT be used.

Reserved (2 bytes): A 16-bit reserved value. This field MUST be set to 0x0000 and MUST be ignored.

Flags (4 bytes): A 32-bit unsigned integer that contains zero or more of the following flag values. Flag values not specified in the following table SHOULD be set to 0 and MUST be ignored.

Value

Meaning

FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF

0x00000001

Indicates that checksum enforcement is not currently enabled on the target file.

All other values

Reserved for future use and MUST NOT be used.

ChecksumChunkSizeInBytes (4 bytes): A 32-bit unsigned integer specifying the size in bytes of each chunk in a stream that is configured with integrity.

ClusterSizeInBytes (4 bytes): A 32-bit unsigned integer specifying the size of a cluster for this volume in bytes.

This message also returns a status code, as specified in section 2.2. Upon success, the status code returned by the function that processes this FSCTL MUST be STATUS_SUCCESS or one of the following.

Error code

Meaning

STATUS_INVALID_PARAMETER

0xC000000D

The output buffer length is less than the size of the FSCTL_GET_INTEGRITY_INFORMATION_BUFFER data element, or the handle is not to a file or directory.

STATUS_INVALID_DEVICE_REQUEST

0xC0000010

The volume does not support integrity.