]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: block-group: Refactor btrfs_read_block_groups()
authorQu Wenruo <wqu@suse.com>
Thu, 10 Oct 2019 02:39:27 +0000 (10:39 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 16:51:50 +0000 (17:51 +0100)
commit17339857e2b29ce6a23bccb01fd28d0722f9bd26
tree4ebd34e384ad2e9c4eda408daf1a0e02beeb52ec
parent50e13b6189f8b85a274dafe8b1c0fd589e5b70c5
btrfs: block-group: Refactor btrfs_read_block_groups()

Refactor the work inside the loop of btrfs_read_block_groups() into one
separate function, read_one_block_group().

This allows read_one_block_group to be reused for later BG_TREE feature.

The refactor does the following extra fix:
- Use btrfs_fs_incompat() to replace open-coded feature check

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c