On 05/05/2020 01:58, Qu Wenruo wrote:
> When deleting a block group item, it's pretty straight forward, just
> delete the item pointed by the key.
>
> However it will not be that straight-forward for incoming skinny block
> group item.
>
> So refactor the block group item deletion into a new function,
> remove_block_group_item(), also to make the already lengthy
> btrfs_remove_block_group() a little shorter.
I think this patch is useful even without the skinny_bg feature.
> +static int remove_block_group_item(struct btrfs_trans_handle *trans,
> + struct btrfs_path *path,
> + struct btrfs_block_group *block_group)
> +{
> + struct btrfs_fs_info *fs_info = trans->fs_info;
> + struct btrfs_root *root;
Tiny nitpick, why not:
struct btrfs_root *root = fs_info->extent_root;
Like it was in brtfs_remove_block_group()?
Anyways looks good to me,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>