git: DragonFly_RELEASE_6_2 hammer2 - Fix CHECK fail path that might mangle an inode in-memory

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Apr 27 09:19:19 PDT 2022


commit 18f09112bfc039be4e460a70daee7349406abb01
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Apr 21 22:37:21 2022 -0700

    hammer2 - Fix CHECK fail path that might mangle an inode in-memory
    
    * Allowing the wrong inode block to be entered in-memory can result in
      massive filesystem confusion.
    
    * Add a sanity check in hammer2_chain_inode_find() to validate that
      the inode field in an on-media inode matches the inode number we are
      trying to look up.  This case is not supposed to happen, but it did on
      grok's /build5 partition (likely due to a bulkfree early-termination
      issue which is now being looked at).
    
      If this test fails, we simulate a CRC CHECK failure.
    
    * Remove hammer2_cluster_resolve() (it was replaced by hammer2_cluster_check()).

Summary of changes:
 sys/vfs/hammer2/hammer2.h         |   1 -
 sys/vfs/hammer2/hammer2_admin.c   |   4 +-
 sys/vfs/hammer2/hammer2_chain.c   |  39 +++-
 sys/vfs/hammer2/hammer2_cluster.c | 388 +-------------------------------------
 sys/vfs/hammer2/hammer2_xops.c    |   6 +
 5 files changed, 50 insertions(+), 388 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/18f09112bfc039be4e460a70daee7349406abb01


-- 
DragonFly BSD source repository


More information about the Commits mailing list