HAMMER VFS - return shorter-form softlinks "@@-1:%05d" when appropriate.
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 12 Mar 2009 16:03:08 +0000 (09:03 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 12 Mar 2009 16:03:08 +0000 (09:03 -0700)
commitcb3c760c39e6b389729c7f8d6e152f7e20c39879
treea27f16ef0f8ee3146b3069888230dff277c1bd73
parent574066d3d9513d57ba17e36786680e7d4f9dc032
HAMMER VFS - return shorter-form softlinks "@@-1:%05d" when appropriate.

The HAMMER VFS supports a short "@@-1:%05d" for master PFSs.  Adjust the
HAMMER VFS to return softlinks in that form and adjust the hammer cleanup
code to recognize softlinks in that form.

Note that PFS softlinks are created as "@@PFS%05d", but the HAMMER VFS
presents them in an expanded form which allows the HAMMER VFS to reflect
the latest synchronized transaction id on slave PFSs.  This also prevents
slave PFSs from confusing DragonFly's namecache as each snapshot will appear
to be an entirely different path.

Unfortunately this does mean that cpdup/cp/tar will pickup a translated
softlink and not the actual one.  It's just something else to remember
about these 'weird' PFS mount points.

Suggested-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
sbin/hammer/cmd_cleanup.c
sys/vfs/hammer/hammer_vnops.c