• Josef Bacik's avatar
    btrfs: introduce BTRFS_NESTING_COW for cow'ing blocks · 9631e4cc
    Josef Bacik authored
    When we COW a block we are holding a lock on the original block, and
    then we lock the new COW block.  Because our lockdep maps are based on
    root + level, this will make lockdep complain.  We need a way to
    indicate a subclass for locking the COW'ed block, so plumb through our
    btrfs_lock_nesting from btrfs_cow_block down to the btrfs_init_buffer,
    and then introduce BTRFS_NESTING_COW to be used for cow'ing blocks.
    
    The reason I've added all this extra infrastructure is because there
    will be need of different nesting classes in follow up patches.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    9631e4cc
relocation.c 100 KB