diff options
author | David Sterba <dsterba@suse.com> | 2019-10-23 19:48:11 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-11-18 19:51:44 +0300 |
commit | bf38be65f3703d5ef3661c0a2802bc28e76b8f19 (patch) | |
tree | 3b1d7c392be5bde0fadd429c5024f1350de764ec /fs/btrfs/space-info.c | |
parent | 34b127aecd4fe8e6a3903e10f204a7b7ffddca22 (diff) | |
download | linux-bf38be65f3703d5ef3661c0a2802bc28e76b8f19.tar.xz |
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>
Diffstat (limited to 'fs/btrfs/space-info.c')
-rw-r--r-- | fs/btrfs/space-info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index 7539696b4cba..749b0be58e2c 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -302,7 +302,7 @@ again: btrfs_info(fs_info, "block group %llu has %llu bytes, %llu used %llu pinned %llu reserved %s", cache->key.objectid, cache->key.offset, - btrfs_block_group_used(&cache->item), cache->pinned, + cache->used, cache->pinned, cache->reserved, cache->ro ? "[readonly]" : ""); btrfs_dump_free_space(cache, bytes); spin_unlock(&cache->lock); |