]> 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)
commit1ad0cf313f346421447b07d502800851a0633bfd
tree4ebd34e384ad2e9c4eda408daf1a0e02beeb52ec
parent5ca4418c0552e40cfa15a68e3c4985d9d1462018
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