btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray
authorGabriel Niebler <gniebler@suse.com>
Tue, 3 May 2022 10:44:43 +0000 (12:44 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:15:57 +0000 (17:15 +0200)
commit48b36a602a335c184505346b5b37077840660634
tree63c4cda90a430112b147d0a480f76b2dd5235655
parent8ee922689d67b7cfa6acbe2aa1ee76ac72e6fc8a
btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray

… rename it to simply fs_roots and adjust all usages of this object to use
the XArray API, because it is notionally easier to use and understand, as
it provides array semantics, and also takes care of locking for us,
further simplifying the code.

Also do some refactoring, esp. where the API change requires largely
rewriting some functions, anyway.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Gabriel Niebler <gniebler@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/inode.c
fs/btrfs/tests/btrfs-tests.c
fs/btrfs/transaction.c