FSCTL_SET_INTEGRITY_INFORMATION IOCTL

Retrieves the integrity status of a file or directory on a ReFS volume.

To perform this operation, call the DeviceIoControl function with the following parameters.

C++
BOOL 
WINAPI 
DeviceIoControl( (HANDLE) hDevice,                // handle to file or directory
                 FSCTL_SET_INTEGRITY_INFORMATION, // dwIoControlCode
                 (LPDWORD) pInBuffer,             // FSCTL_SET_INTEGRITY_INFORMATION_BUFFER 
                 (DWORD) InBufferSize,            // size of input buffer
                 (LPDWORD) NULL,                  // pOutBuffer
                 (DWORD) 0,                       // OutBufferSize
                 (LPDWORD) NULL,                  // lpBytesReturned
                 (LPOVERLAPPED) lpOverlapped );   // OVERLAPPED structure

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

Input Buffer Length

Output Buffer

Output Buffer Length

Input / Output Buffer

Input / Output Buffer Length

Status Block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful.

Otherwise, Status to the appropriate error condition as a NTSTATUS code.

For more information, see NTSTATUS Values.

Remarks

The integrity status can only be changed for empty files.

If the ReplaceFile is used to replace a file with integrity set, and the lpBackupFileName parameter points to a location that does not have integrity set, the integrity status of the original file will not be persisted.

Writes to integrity streams are always cluster-sized. Reads from integrity streams are always done in 16 KB blocks. This can lead to reads failing even when the corrupt area is outside the region being read. For example, if 4 KB is read at offset 0 in a file and there is corruption starting 12 KB into the file, a read would fail with ERROR_DATA_CHECKSUM_ERROR (0x143).

Requirements

   
Minimum supported client None supported
Minimum supported server Windows Server 2012 [desktop apps only]
Header winioctl.h (include Windows.h)

See Also

DeviceIoControl

FSCTL_GET_INTEGRITY_INFORMATION

FSCTL_SET_INTEGRITY_INFORMATION_BUFFER

Volume Management Control Codes