All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Qu Wenruo <wqu@suse.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v4 3/7] btrfs: block-group: Refactor how we delete one block group item
Date: Tue, 5 May 2020 16:55:42 +0800	[thread overview]
Message-ID: <bd019a91-406b-f913-1324-d4803f9b2223@gmx.com> (raw)
In-Reply-To: <SN4PR0401MB35980F5B55AB37C71E789C1D9BA70@SN4PR0401MB3598.namprd04.prod.outlook.com>


[-- Attachment #1.1: Type: text/plain, Size: 1299 bytes --]



On 2020/5/5 下午4:47, Johannes Thumshirn wrote:
> 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()?

That's mostly for the skinny_bg_tree (6th) patch, as in that patch,
skinny_bg_tree feature goes to pick bg_root other than extent root.

So I didn't initialize root here, but leaves it assigned the same timing
as key.

Thanks,
Qu

> 
> Anyways looks good to me,
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-05-05  8:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 23:58 [PATCH v4 0/7] btrfs: Introduce new incompat feature SKINNY_BG_TREE to hugely reduce mount time Qu Wenruo
2020-05-04 23:58 ` [PATCH v4 1/7] btrfs: block-group: Don't set the wrong READA flag for btrfs_read_block_groups() Qu Wenruo
2020-05-04 23:58 ` [PATCH v4 2/7] btrfs: block-group: Refactor how we read one block group item Qu Wenruo
2020-05-04 23:58 ` [PATCH v4 3/7] btrfs: block-group: Refactor how we delete " Qu Wenruo
2020-05-05  8:47   ` Johannes Thumshirn
2020-05-05  8:55     ` Qu Wenruo [this message]
2020-05-05  8:56       ` Johannes Thumshirn
2020-05-04 23:58 ` [PATCH v4 4/7] btrfs: block-group: Refactor how we insert a " Qu Wenruo
2020-05-05  8:59   ` Johannes Thumshirn
2020-05-04 23:58 ` [PATCH v4 5/7] btrfs: block-group: Rename write_one_cahce_group() Qu Wenruo
2020-05-05  9:11   ` Johannes Thumshirn
2020-05-11 19:19   ` David Sterba
2020-05-04 23:58 ` [PATCH v4 6/7] btrfs: Introduce new incompat feature, SKINNY_BG_TREE, to hugely reduce mount time Qu Wenruo
2020-05-05 19:10   ` Johannes Thumshirn
2020-05-04 23:58 ` [PATCH v4 7/7] btrfs: tree-checker: Introduce checks for skinny block group item Qu Wenruo
2020-05-11 19:21 ` [PATCH v4 0/7] btrfs: Introduce new incompat feature SKINNY_BG_TREE to hugely reduce mount time David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd019a91-406b-f913-1324-d4803f9b2223@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.