Export (0) Print
Expand All
Expand Minimize

2.1.5.9.1 FSCTL_CREATE_OR_GET_OBJECT_ID

The server provides:

  • Open: An Open of a DataFile or DirectoryFile.

  • 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 FILE_OBJECTID_BUFFER structure as specified in [MS-FSCC] section 2.1.3.

  • 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.<52>

Pseudocode for the operation is as follows:

  • If Open.File.Volume.IsObjectIDsSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED.

  • If OutputBufferSize is less than sizeof(FILE_OBJECTID_BUFFER), the operation MUST be failed with STATUS_INVALID_PARAMETER.

  • If Open.File.ObjectId is empty:

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

    • The object store MUST set Open.File.ObjectId to a newly generated ObjectId GUID that is unique on Open.File.Volume.<53>

  • EndIf

  • If a new Open.File.ObjectId was generated above or if Open.File.BirthVolumeId and Open.File.BirthObjectId are both empty:

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

    • If Open.File.BirthVolumeId is empty, the object store MUST set Open.File.BirthVolumeId to Open.File.Volume.VolumeId.

    • If Open.File.BirthObjectId is empty, the object store MUST set Open.File.BirthObjectId to Open.File.ObjectId.

    • 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_OBJECT_ID_CHANGE, and FileName equal to Open.Link.Name.

  • EndIf

If a new Open.File.ObjectId was generated above, the object store MUST update Open.File.LastChangeTime.<54>

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

  • OutputBuffer.ObjectId set to Open.File.ObjectId.

  • OutputBuffer.BirthVolumeId set to Open.File.BirthVolumeId.

  • OutputBuffer.BirthObjectId set to Open.File.BirthObjectId.

  • OutputBuffer.DomainId set to empty.

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

  • BytesReturned set to sizeof(FILE_OBJECTID_BUFFER).

  • Status set to STATUS_SUCCESS.

 
Show:
© 2014 Microsoft