Pseudocode for the operation is as follows:
If InputBufferSize is less than the size, in bytes, of the FILE_VALID_DATA_LENGTH_INFORMATION structure, the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.
If Open.File.Volume.IsReadOnly is TRUE, the operation MUST be failed with STATUS_MEDIA_WRITE_PROTECTED.
If Open.HasManageVolumeAccess is FALSE, the operation MUST be failed with STATUS_PRIVILEGE_NOT_HELD.
The operation MUST be failed with STATUS_INVALID_PARAMETER under any of the following conditions:
If Open.Stream.ValidDataLength is greater than InputBuffer.ValidDataLength.
If Open.Stream.IsCompressed is TRUE.
If Open.Stream.IsSparse is TRUE.
If Open.File.FileType is DirectoryFile.
If Open.Stream.Oplock is not empty, the object store MUST check for an oplock break according to the algorithm in section 220.127.116.11, with input values as follows:
Open equal to this operation's Open.
Oplock equal to Open.Stream.Oplock.
Operation equal to "SET_INFORMATION".
OpParams containing a member FileInformationClass containing FileValidDataLengthInformation.
Open.Stream.ValidDataLength MUST be set to InputBuffer.ValidDataLength.