Export (0) Print
Expand All
3 out of 6 rated this helpful - Rate this topic

Reparse Point Tags

Each reparse point has an identifier tag so that you can efficiently differentiate between the different types of reparse points, without having to examine the user-defined data in the reparse point. The system uses a set of predefined tags and a range of tags reserved for Microsoft. If you use any of the reserved tags when setting a reparse point, the operation fails. Tags not included in these ranges are not reserved and are available for your application.

When you set a reparse point, you must tag the data to be placed in the reparse point. After the reparse point has been established, a new set operation fails if the tag for the new data does not match the tag for the existing data. If the tags match, the set operation overwrites the existing reparse point.

To retrieve the reparse point tag, use the FindFirstFile function. If the dwFileAttributes member includes the FILE_ATTRIBUTE_REPARSE_POINT attribute, then the dwReserved0 member specifies the reparse point.

Tag Contents

Reparse tags are stored as DWORD values. The bits define certain attributes, as shown in the following diagram.

   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  +-+-+-+-+-----------------------+-------------------------------+
  |M|R|N|R|     Reserved bits     |      Reparse tag value        |
  +-+-+-+-+-----------------------+-------------------------------+

The low 16 bits determine the kind of reparse point. The high 16 bits have 12 bits reserved for future use and 4 bits that denote specific attributes of the tags and the data represented by the reparse point. The following table describes these bits.

BitDescription
MMicrosoft bit. If this bit is set, the tag is owned by Microsoft. All other tags must use zero for this bit.
RReserved; must be zero for all non-Microsoft tags.
NName surrogate bit. If this bit is set, the file or directory represents another named entity in the system.

 

The following macros exist to assist in testing tags:

Each macro returns a nonzero value if the associated bit is set.

The following are Microsoft's predefined reparse tag values; they are defined in WinNT.h:

  • IO_REPARSE_TAG_CSV
  • IO_REPARSE_TAG_DEDUP
  • IO_REPARSE_TAG_DFS
  • IO_REPARSE_TAG_DFSR
  • IO_REPARSE_TAG_HSM
  • IO_REPARSE_TAG_HSM2
  • IO_REPARSE_TAG_MOUNT_POINT
  • IO_REPARSE_TAG_NFS
  • IO_REPARSE_TAG_RESERVED_ONE
  • IO_REPARSE_TAG_RESERVED_RANGE
  • IO_REPARSE_TAG_RESERVED_ZERO
  • IO_REPARSE_TAG_SIS
  • IO_REPARSE_TAG_SYMLINK
  • IO_REPARSE_TAG_WIM

To ensure uniqueness of tags, Microsoft provides a mechanism to distribute new tags. For more information, see the Installable File System (IFS) Kit.

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.