git: hammer2 - Add "hammer2 recover" directive, recover/undo dirtrees, part 2

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Sep 29 11:16:57 PDT 2023


commit 5627cde5b94052a589a7961b32b73da981f15521
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Sep 29 11:12:15 2023 -0700

    hammer2 - Add "hammer2 recover" directive, recover/undo dirtrees, part 2
    
    * Refactor, adding support for recovery of root-anchored and unanchored
      directory sub-trees in addition to files, etc.  Single media pass.
    
    * The initial scan is a bit slower but more robust.  Instead of trying
      to build an initial directory entry database without validation, we
      instead look for BREFs pointing to inodes as well as working copies
      of inode #1's (PFS and snapshot root inodes) which might not have a
      BREF pointing at them.
    
      We then scan the directory inodes looking for paths that match the
      requested recovery.
    
    * Attempt to weed-out duplicate scans at the same directory level.

Summary of changes:
 sbin/hammer2/cmd_recover.c | 947 +++++++++++++++++++++++++++++++++++++--------
 sbin/hammer2/hammer2.8     |  30 +-
 sbin/hammer2/main.c        |  11 +-
 3 files changed, 810 insertions(+), 178 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5627cde5b94052a589a7961b32b73da981f15521


-- 
DragonFly BSD source repository


More information about the Commits mailing list