]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
btrfs: introduce BTRFS_NESTING_LEFT/RIGHT_COW
authorJosef Bacik <josef@toxicpanda.com>
Thu, 20 Aug 2020 15:46:05 +0000 (11:46 -0400)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:12:16 +0000 (12:12 +0200)
commitbf59a5a21604ef79da9105bef1bae817fd053e75
treec77e328755674e909fede6da8bca28748b6584b1
parentbf77467a93bdf11d815f5c5f25206a0d058da8de
btrfs: introduce BTRFS_NESTING_LEFT/RIGHT_COW

For similar reasons as BTRFS_NESTING_COW, we need
BTRFS_NESTING_LEFT/RIGHT_COW.  The pattern is this

lock leaf -> BTRFS_NESTING_NORMAL
  cow leaf -> BTRFS_NESTING_COW
    split leaf
      lock left -> BTRFS_NESTING_LEFT
        cow left -> BTRFS_NESTING_LEFT_COW

We need this in order to indicate to lockdep that these locks are
discrete and are being taken in a safe order.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/locking.h