git: hammer2 - flush sequencing part 8 - stabilization pass

Matthew Dillon dillon at crater.dragonflybsd.org
Sun May 12 20:48:59 PDT 2013


commit 09dd2dfe967a49429e51b8648e17be601a369908
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun May 12 20:44:32 2013 -0700

    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.

Summary of changes:
 sys/vfs/hammer2/hammer2.h       |  7 ++++++-
 sys/vfs/hammer2/hammer2_chain.c | 21 ++++++++-------------
 sys/vfs/hammer2/hammer2_flush.c | 19 ++++++++++++++++++-
 sys/vfs/hammer2/hammer2_inode.c |  3 ++-
 4 files changed, 34 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/09dd2dfe967a49429e51b8648e17be601a369908


-- 
DragonFly BSD source repository


More information about the Commits mailing list