git: hammer2 - Revamp snapshot code

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Sep 30 17:45:05 PDT 2013


commit 9b6b3df4feb5e8056cf5a14f5a8e498f86c1a10e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Sep 30 17:40:40 2013 -0700

    hammer2 - Revamp snapshot code
    
    * Change the snapshot code to not use chain_duplicate().  Instead
      get the thing working by flushing the original sub-tree, creating
      a new directory under the super-root, and then simply copying the
      blockset.
    
      The previous code called chain_duplicate() to create the snapshot
      but the coding still required a flush.  Doing it without a flush
      is possible for a read-only snapshot but very difficult otherwise.
    
    * This will simplify coding down the line.

Summary of changes:
 sys/vfs/hammer2/hammer2.h        |   2 +-
 sys/vfs/hammer2/hammer2_chain.c  | 120 +++++++++++++++++++++++----------------
 sys/vfs/hammer2/hammer2_flush.c  |   4 ++
 sys/vfs/hammer2/hammer2_inode.c  |   3 +-
 sys/vfs/hammer2/hammer2_ioctl.c  |   4 +-
 sys/vfs/hammer2/hammer2_vfsops.c |  13 ++++-
 6 files changed, 91 insertions(+), 55 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9b6b3df4feb5e8056cf5a14f5a8e498f86c1a10e


-- 
DragonFly BSD source repository



More information about the Commits mailing list