2.1.5.10.3 FSCTL_DELETE_REPARSE_POINT

The server provides:

  • Open: An Open of a DataFile or DirectoryFile.

  • ReparseTag: An identifier indicating the type of the reparse point to delete, as defined in [MS-FSCC] section 2.1.2.1.

  • ReparseGUID: A GUID indicating the type of the reparse point to delete.

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>

Pseudocode for the operation is as follows:

  • Phase 1 -- Verify the parameters.

  • If (Open.GrantedAccess & (FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES)) == 0, the operation MUST be failed with STATUS_ACCESS_DENIED.

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

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

  • If the ReparseTag is either IO_REPARSE_TAG_RESERVED_ZERO or IO_REPARSE_TAG_RESERVED_ONE, the operation MUST be failed with STATUS_IO_REPARSE_TAG_INVALID. The reserved reparse tags are defined in [MS-FSCC] section 2.1.2.1.

  • If ReparseTag is a non-Microsoft Reparse Tag, then the ReparseGUID MUST be a valid GUID; otherwise the operation MUST be failed with STATUS_IO_REPARSE_DATA_INVALID.

  • Phase 2 -- Validate that the requested tag deletion type matches with the stored tag type.

  • If (ReparseTag != Open.File.ReparseTag), the operation MUST be failed with STATUS_IO_REPARSE_TAG_MISMATCH.

  • If (ReparseTag is a non-Microsoft Reparse Tag && Open.File.ReparseGUID != ReparseGUID), the operation MUST be failed with STATUS_REPARSE_ATTRIBUTE_CONFLICT.

  • Phase 3 -- Remove the reparse point from the File.

  • Set Open.File.ReparseData, Open.File.ReparseGUID, and Open.File.ReparseTag to empty.

  • Update Open.File.LastChangeTime to the current system time.<88>

  • If Open.File.FileType == DataFile, set Open.File.FileAttributes.FILE_ATTRIBUTE_ARCHIVE to TRUE.

  • Set Open.File.PendingNotifications.FILE_NOTIFY_CHANGE_LAST_ACCESS to TRUE.

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

    • Status set to STATUS_SUCCESS.