btrfs: kill the subvol_srcu
authorJosef Bacik <josef@toxicpanda.com>
Fri, 14 Feb 2020 21:11:47 +0000 (16:11 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:02:00 +0000 (17:02 +0100)
commitc75e839414d3610e6487ae3145199c500d55f7f7
tree68e609a6362c4f259afc2e107fffac94e743a126
parentefc3453494af78180ac00d9dd8391fd52c4a921e
btrfs: kill the subvol_srcu

Now that we have proper root ref counting everywhere we can kill the
subvol_srcu.

* removal of fs_info::subvol_srcu reduces size of fs_info by 1176 bytes

* the refcount_t used for the references checks for accidental 0->1
  in cases where the root lifetime would not be properly protected

* there's a leak detector for roots to catch unfreed roots at umount
  time

* SRCU served us well over the years but is was not a proper
  synchronization mechanism for some cases

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/export.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/send.c
fs/btrfs/tests/btrfs-tests.c