Export (0) Print
Expand All
Expand Minimize

2.1.5.9.29 FSCTL_SET_INTEGRITY_INFORMATION

The server provides:<86>

  • Open: An Open of a DataFile or DirectoryFile.

  • InputBuffer: An array of bytes containing an FSCTL_SET_INTEGRITY_INFORMATION_BUFFER structure indicating the requested integrity state of the directory or file, as specified in [MS-FSCC] section 2.3.55.

  • InputBufferSize: The number of bytes in InputBuffer.

On completion, the object store MUST return:

  • Status: An NTSTATUS code that specifies the result.

Support for this operation is optional. If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.<87><88>

The operation MUST be failed with STATUS_INVALID_PARAMETER under any of the following conditions:

  • InputBufferSize is less than sizeof(FSCTL_SET_INTEGRITY_INFORMATION_BUFFER).

  • InputBuffer.ChecksumAlgorithm is not one of the predefined values in [MS-FSCC] section 2.3.55.

Pseudocode for the operation is as follows:

  • If Open.File.Volume.IsReadOnly is TRUE, the operation MUST be failed with STATUS_MEDIA_WRITE_PROTECTED.

  • If Open.Stream.StreamType is DirectoryStream:

    • The object store MUST post a USN change as specified in section 2.1.4.11 with File equal to Directory, Reason equal to USN_REASON_INTEGRITY_CHANGE, and FileName equal to Open.Link.Name.

    • If InputBuffer.ChecksumAlgorithm != CHECKSUM_TYPE_UNCHANGED, the object store MUST set Open.Stream.CheckSumAlgorithm to InputBuffer.ChecksumAlgorithm.

  • EndIf

  • If Open.Stream.StreamType is DataStream:

    • The object store MUST post a USN change as specified in section 2.1.4.11 with File equal to File, Reason equal to USN_REASON_INTEGRITY_CHANGE, and FileName equal to Open.Link.Name.

    • If InputBuffer.ChecksumAlgorithm != CHECKSUM_TYPE_UNCHANGED, the object store MUST set Open.Stream.CheckSumAlgorithm to InputBuffer.ChecksumAlgorithm.

    • If (InputBuffer.Flags & FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF) != 0,

      • The object store MUST set Open.Stream.StreamChecksumEnforcementOff to TRUE.

    • Else:

      • The object store MUST set Open.Stream.StreamChecksumEnforcementOff to FALSE.

    • EndIf

  • EndIf

  • Upon successful completion of the operation, the object store MUST return:

    • Status set to STATUS_SUCCESS.

 
Show:
© 2014 Microsoft