hammer2 - Present hardlink solution, misc stability work
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 18 Nov 2015 01:21:14 +0000 (17:21 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 18 Nov 2015 01:21:14 +0000 (17:21 -0800)
commit2efe493b366f9b5f683af645f94e85f257fec556
tree738343ff3550716514af23bcdee155e5f99038b3
parentb6222364e241f64d64a813e7558a7499ad9242ea
hammer2 - Present hardlink solution, misc stability work

* The H2 design has had a long-standing problem of losing track of
  hardlinks when intermediate directories are renamed, breaking the
  common-parent-directory design for the inode target.

  Fix this issue by placing the hardlink target in the first common
  parent directory chflagged 'xlink' (or the root of the mount if
  no parent is chflagged 'xlink').  Thus, by default, hardlink targets
  for cross-directory situations will be placed in the root of the mount
  and thus no confusion can ever occur if a mid-path directory is moved
  within the hierarchy.

* This change does not modify the behavior of placing the hardlink target
  in the same directory as the hardlink pointers when they are all in the
  same directory.

* installworld now chflags /*, /usr/*, /var/*, and /home/* 'xlink'.

* Note that hardlink and rename operations across 'xlink' boundaries
  are disallowed (for obvious reasons), but system operators have very
  rarely used hardlinks in major directory crossings.  However, we might
  be pushing it a bit much to automatically chflag /home/*.

  In the past there have been a few minor situations where major-crossing
  hardlinks are attempted.  'lpr' for example tries to hardlink a user
  file into /var/spool, but will copy it if it cannot.  Similarly there
  have been situations in the past where hardlinks between home directories
  have been used to save space, but franklyl softlinks can be used almost
  as easily and such situations have fallen into disfavor.

* Stability improvements to the XOP FIFO mechanics, locking cleanups.
sys/sys/mutex2.h
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_thread.c
sys/vfs/hammer2/hammer2_vnops.c
sys/vfs/hammer2/hammer2_xops.c