OSDN Git Service

btrfs: move block_group_item::used to block group
authorDavid Sterba <dsterba@suse.com>
Wed, 23 Oct 2019 16:48:11 +0000 (18:48 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 16:51:44 +0000 (17:51 +0100)
commitbf38be65f3703d5ef3661c0a2802bc28e76b8f19
tree3b1d7c392be5bde0fadd429c5024f1350de764ec
parent34b127aecd4fe8e6a3903e10f204a7b7ffddca22
btrfs: move block_group_item::used to block group

For unknown reasons, the member 'used' in the block group struct is
stored in the b-tree item and accessed everywhere using the special
accessor helper. Let's unify it and make it a regular member and only
update the item before writing it to the tree.

The item is still being used for flags and chunk_objectid, there's some
duplication until the item is removed in following patches.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/block-group.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/ioctl.c
fs/btrfs/relocation.c
fs/btrfs/scrub.c
fs/btrfs/space-info.c
fs/btrfs/sysfs.c
fs/btrfs/volumes.c
include/trace/events/btrfs.h