Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

2.1.5.9.39 FSCTL_WRITE_USN_CLOSE_RECORD

The server provides:

  • Open: An Open of a DataStream or DirectoryStream.

  • OutputBufferSize: The maximum number of bytes to return in OutputBuffer.

On completion, the object store MUST return:

  • Status: An NTSTATUS code that specifies the result.

  • OutputBuffer: An array of bytes that will return a Usn structure representing the current USN of the file, as specified in [MS-FSCC] section 2.3.74.

  • BytesReturned: The number of bytes returned in OutputBuffer.

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.<110>

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 OutputBufferSize is less than sizeof(Usn), the operation MUST be failed with STATUS_INVALID_PARAMETER.

  • If Open.File.Volume.IsUsnJournalActive is FALSE, the operation MUST be failed with STATUS_JOURNAL_NOT_ACTIVE.

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

  • The object store MUST populate the fields of OutputBuffer as follows:

    • OutputBuffer.Usn set to Open.File.Usn.

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

    • BytesReturned set to sizeof(Usn).

    • Status set to STATUS_SUCCESS.

Show:
© 2016 Microsoft