btrfs: block-group: refactor how we insert a block group item
authorQu Wenruo <wqu@suse.com>
Mon, 4 May 2020 23:58:22 +0000 (07:58 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:31 +0000 (11:25 +0200)
commit97f4728af88822ddd13941c3ac84a4ce3a9ff823
treebf2ed34320791c9c2b654011b50901f407cb64c9
parent7357623a7f4beb4ac76005f8fac9fc0230f9a67e
btrfs: block-group: refactor how we insert a block group item

Currently the block group item insert is pretty straight forward, fill
the block group item structure and insert it into extent tree.

However the incoming skinny block group feature is going to change this,
so this patch will refactor insertion into a new function,
insert_block_group_item(), to make the incoming feature easier to add.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.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