hammer2 - Major restructuring, part 4/several
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 3 May 2013 08:28:00 +0000 (01:28 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 3 May 2013 08:28:00 +0000 (01:28 -0700)
commit9797e933b125aaafa99bf816ad3e1c9e0143395f
treee33d1b96c5ed26ccbdb366d8d7a0884aca52b3dd
parentea155208315d63a64e9e53552d15aae4321eefb4
hammer2 - Major restructuring, part 4/several

* Add inumber -> inode structure tracking and lookup.  This is needed to
  ensure that only a single inode structure be used to track multiple
  hardlinks to the same place.

* Continue stabilization.  Remove modify_tid/delete_tid checks in the
  flush code and (for now) only flush along the live path.

  Refactor held chains when creating new chains.  The creation of a new
  chain can move around existing chains, causing the held chain to be
  marked deleted.

  When a hardlink is consolidated in a parent directory the source chain
  used in the duplication is not deleted.  Numerous chain->duplink
  handling code was assuming that the source was always deleted.  Fix
  that.

* The shared inode lock now refactors ip->chain (the exclusive inode lock
  already did so).

* Fix most ref-counting of the chain structure, fixing most of the memory
  leakage issues on unmount.

* There are still some issues with small files not inheriting their data
  on duplication.  cpdup /usr/share works but a significant number of
  small files lose their data references on re-mount.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_ccms.c
sys/vfs/hammer2/hammer2_ccms.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_subr.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_vnops.c