hammer2 - flush sequencing part 8 - stabilization pass
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 13 May 2013 03:44:32 +0000 (20:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 13 May 2013 03:44:32 +0000 (20:44 -0700)
commit09dd2dfe967a49429e51b8648e17be601a369908
tree83c859bd03346fa177a93fca29efd557a4724c01
parent775153c21c9bf4fe08c62b00ce36092329a2faec
hammer2 - flush sequencing part 8 - stabilization pass

* On this commit it appears that the cpdup / test is fully validating
  on remount and chain memory leaks are gone.

* Remove a hack when creating a hardlink.  The original directory entry
  is duplicated to create the invisible hardlink target in the common
  parent directory, but the original directory entry is then not deleted.
  Instead I was modifying it (which generally did not cause a delete/duplicate
  sequence) and then changing the inode type to HARDLINK and setting
  the OPFLAG_DIRECTDATA flag.

  The problem with this is that the inode's core RBTREE was left intact,
  but as a DIRECTDATA inode the flusher ignores it.  This prevented the
  flusher from clearing the MOVED but on the children and resulted in the
  memory leak.

  What I do now is delete/duplicate the original inode, give the duplicate
  a fresh core, and then modify the duplicate instead of the original to be
  the special HARDLINK type w/OPFLAG_DIRECTDATA.  This removes the special
  case.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_inode.c