1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Display OpenAFS reparse point info

Discussion in 'Suggestions' started by jaltman, May 20, 2012.

  1. jaltman

    Joined:
    Jan 19, 2009
    Messages:
    24
    Likes Received:
    1
    tcc.exe recognizes objects with reparse points and displays SYMLINKD or JUNCTION in the directory listing output. When the file system is \Device\AFSRedirector (OpenAFS 1.7.x or higher) AFS mount points and symlinks are exposed as reparse points using the Microsoft assigned value:

    IO_REPARSE_TAG_OPENAFS_DFS 0x00000037L

    OR'd with

    IO_REPARSE_TAG_SURROGATE 0x20000000L

    The data format for the reparse data is:

    //
    // Reparse tag AFS Specific information buffer
    //

    #define OPENAFS_SUBTAG_MOUNTPOINT 1
    #define OPENAFS_SUBTAG_SYMLINK 2
    #define OPENAFS_SUBTAG_UNC 3

    #define OPENAFS_MOUNTPOINT_TYPE_NORMAL L'#'
    #define OPENAFS_MOUNTPOINT_TYPE_RW L'%'

    typedef struct _AFS_REPARSE_TAG_INFORMATION
    {

    ULONG SubTag;

    union
    {
    struct
    {
    ULONG Type;
    USHORT MountPointCellLength;
    USHORT MountPointVolumeLength;
    WCHAR Buffer[1];
    } AFSMountPoint;

    struct
    {
    BOOLEAN RelativeLink;
    USHORT SymLinkTargetLength;
    WCHAR Buffer[1];
    } AFSSymLink;

    struct
    {
    USHORT UNCTargetLength;
    WCHAR Buffer[1];
    } UNCReferral;
    };

    } AFSReparseTagInfo;

    It would be really nice if take command would report the target info for AFS mount points and symlinks instead of:

    Directory of \\afs\your-file-system.com\*

    4/11/2012 22:00 <DIR> backups
    1/30/2012 13:13 <DIR> project
    12/05/2011 11:14 <JUNCTION> public [\\afs\your-file-system.com\public]
    3/14/2011 13:52 <DIR> service
    7/26/2010 21:44 <JUNCTION> support [\\afs\your-file-system.com\support]
    6/15/2011 12:40 <JUNCTION> test [\\afs\your-file-system.com\test]
    2/15/2012 9:49 <DIR> u
    3/05/2012 18:00 <DIR> user
    3/05/2012 18:00 <JUNCTION> usr [\\afs\your-file-system.com\usr]
    12/10/2009 1:34 <JUNCTION> www [\\afs\your-file-system.com\www]

    where 'usr' is a symlink to 'user' and the other junctions are mount points.
     
  2. jaltman

    Joined:
    Jan 19, 2009
    Messages:
    24
    Likes Received:
    1
    This suggestion was partially implemented in a late version 14 build and fully implemented in 15.0
     

Share This Page