git: libc - Add 'xlink' chflags

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Nov 17 15:53:01 PST 2015


commit b6222364e241f64d64a813e7558a7499ad9242ea
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Nov 17 15:19:42 2015 -0800

    libc - Add 'xlink' chflags
    
    * Add the xlink flag.  This will be used by hammer2 to demark boundaries
      where cross-link hardlinks will not be allowed.  In otherwords, this tells
      hammer2 how far up the directory tree it has to store the inode used for
      a hardlink.
    
    * Automatically set the xlink flag for /*, /usr/*, and /var/*.
    
    * Note that for the case where all hardlinks are situated in the same
      directory, hammer2 will place the hardlink inode in that directory.
      It is when hardlinks cross directories that hammer2 has to emplace the
      target inode in some parent directory where it can find it.  This is
      where the xlink flag helps.
    
      It is not required to use the xlink flag, but if you have cross-directory
      hardlinks in hammer2 and you do not use the flag the inodes for those
      hardlinks will be consolidated at the root of the mount which will have
      obvious performance issues and cause snapshots of subdirectories to be
      imprecise because they won't cover the hardlink target.
    
    * Represents a trade-off for a very difficult problem that I haven't been
      able to solve.  While HAMMER2 can easily calculate a common parent
      directory for the hardlink target inode when hardlinks are created or
      deleted or renamed, problems arise when a directory in the directory
      path leading from that point to the hardlink is radically moved within
      the larger directory hierarchy, breaking the ability for hammer2 to locate
      the hardlink target using the above method.
    
      Rather than force hardlinks to be stored in the root of the mount, which
      reduces the usefulness of subdirectory snapshots, this new mechanism is
      being added to give the sysop the ability to retain nearly all the
      advantages of hardlinks without losing the ability to snapshot reasonable
      subdirectory elements.

Summary of changes:
 etc/Makefile               | 4 ++++
 lib/libc/gen/strtofflags.c | 5 +++++
 sys/sys/stat.h             | 3 +++
 3 files changed, 12 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b6222364e241f64d64a813e7558a7499ad9242ea


-- 
DragonFly BSD source repository


More information about the Commits mailing list