Partilhar via


2.3.73 FSCTL_SET_INTEGRITY_INFORMATION Request

The FSCTL_SET_INTEGRITY_INFORMATION Request message requests that the server set the integrity state of the file or directory associated with the handle on which this FSCTL was invoked.<75>

If the file system of the volume containing the specified file or directory does not support integrity, the request MUST NOT succeed. The error code returned in this situation is specified in section 2.2.

The FSCTL_SET_INTEGRITY_INFORMATION_BUFFER 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

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 set to not use integrity.

CHECKSUM_TYPE_CRC64

0x0002

The file or directory is set to provide integrity using a CRC64 checksum.

CHECKSUM_TYPE_UNCHANGED

0xFFFF

The integrity status of the file or directory is unchanged.

All other values

0x0003 — 0xFFFE

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 set to not use integrity.

CHECKSUM_TYPE_CRC32

0x0001

The file or directory is set to provide integrity using a CRC32 or CRC64 checksum. If the ReFS cluster size is 4KB, the checksum used is CRC32; otherwise, if the cluster size is 64K, the CRC64 checksum is used.

CHECKSUM_TYPE_CRC64

0x0002

The file or directory is set to provide integrity using a CRC32 or CRC64 checksum. If the ReFS cluster size is 4KB, the checksum used is CRC32; otherwise, if the cluster size is 64K, the CRC64 checksum is used.

CHECKSUM_TYPE_UNCHANGED

0xFFFF

The integrity status of the file or directory is unchanged.

All other values

0x0003 — 0xFFFE

Reserved for future use and MUST NOT be used.

Note that for ReFS v2 any value except CHECKSUM_TYPE_NONE or CHECKSUM_TYPE_UNCHANGED will set the integrity value to a file-system-selected integrity mechanism and is not guaranteed to use the user specified checksum value.

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

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

Value

Meaning

FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF

0x00000001

When set, if a checksum does not match, the associated I/O operation will not be failed.