From: Qu Wenruo <wqu@suse.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, Christoph Hellwig <hch@lst.de>
Cc: David Sterba <dsterba@suse.com>,
Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 04/10] btrfs: split btrfs_submit_data_bio
Date: Thu, 5 May 2022 06:44:01 +0800 [thread overview]
Message-ID: <c026bdcc-3e06-cf85-b1af-bcc617be7ff9@suse.com> (raw)
In-Reply-To: <b9283134-54b4-5a9a-f8c4-099cdb5df6fb@gmx.com>
On 2022/5/5 06:41, Qu Wenruo wrote:
>
>
> On 2022/5/4 22:08, Christoph Hellwig wrote:
>> On Wed, May 04, 2022 at 08:38:23PM +0800, Qu Wenruo wrote:
>>>> + struct inode *inode = tree->private_data;
>>>
>>> I guess we shouldn't use the extent_io_tree for bio->bi_private at all
>>> if we're just tring to grab an inode.
>>>
>>> In fact, for all submit_one_bio() callers, we are handling buffered
>>> read/write, thus we can grab inode using
>>> bio_first_page_all(bio)->mapping->host.
>>>
>>> No need for such weird io_tree based dance.
>>
>> Yes, we can eventully. Not for this series, though.
>
> Looking forward to the new cleanups on various weird private member usage.
>>
>>>> - if (is_data_inode(tree->private_data))
>>>> - btrfs_submit_data_bio(tree->private_data, bio, mirror_num,
>>>> - compress_type);
>>>> + if (!is_data_inode(tree->private_data))
>>>> + btrfs_submit_metadata_bio(inode, bio, mirror_num);
>>>
>>> Can we just call btrfs_submit_metadata_bio() and return?
>>>
>>> Every time I see an "if () else if ()", I can't stop thinking if we have
>>> some corner cases not taken into consideration.
>>
>> I generally agree with you, but for this case I think it is pretty
>> simple. But a few more series down the road these helpers will change
>> a bit anyway, so we can revisit it.
>>
> OK, that sounds good.
>
> Just a little worried about how many series there still are...
>
> Thanks,
> Qu
>
Oh, forgot the tag.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
next prev parent reply other threads:[~2022-05-04 22:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 12:25 cleanup btrfs bio handling, part 2 v3 Christoph Hellwig
2022-05-04 12:25 ` [PATCH 01/10] btrfs: don't double-defer bio completions for compressed reads Christoph Hellwig
2022-05-04 12:25 ` [PATCH 02/10] btrfs: move more work into btrfs_end_bioc Christoph Hellwig
2022-05-04 12:25 ` [PATCH 03/10] btrfs: cleanup btrfs_submit_dio_bio Christoph Hellwig
2022-05-04 12:25 ` [PATCH 04/10] btrfs: split btrfs_submit_data_bio Christoph Hellwig
2022-05-04 12:38 ` Qu Wenruo
2022-05-04 14:08 ` Christoph Hellwig
2022-05-04 22:41 ` Qu Wenruo
2022-05-04 22:44 ` Qu Wenruo [this message]
2022-05-05 15:08 ` Christoph Hellwig
2022-05-04 12:25 ` [PATCH 05/10] btrfs: defer I/O completion based on the btrfs_raid_bio Christoph Hellwig
2022-05-04 12:25 ` [PATCH 06/10] btrfs: don't use btrfs_bio_wq_end_io for compressed writes Christoph Hellwig
2022-05-11 19:20 ` Nikolay Borisov
2022-05-11 19:28 ` Nikolay Borisov
2022-05-12 5:56 ` Christoph Hellwig
2022-05-04 12:25 ` [PATCH 07/10] btrfs: centralize setting REQ_META Christoph Hellwig
2022-05-04 12:25 ` [PATCH 08/10] btrfs: remove btrfs_end_io_wq Christoph Hellwig
2022-05-05 2:34 ` Qu Wenruo
2022-05-05 15:09 ` Christoph Hellwig
2022-05-04 12:25 ` [PATCH 09/10] btrfs: refactor btrfs_map_bio Christoph Hellwig
2022-05-04 12:46 ` Qu Wenruo
2022-05-04 12:25 ` [PATCH 10/10] btrfs: do not allocate a btrfs_bio for low-level bios Christoph Hellwig
2022-05-05 11:23 ` Qu Wenruo
2022-05-05 6:56 ` cleanup btrfs bio handling, part 2 v3 Qu Wenruo
2022-05-05 15:11 ` Christoph Hellwig
2022-05-12 6:22 ` Anand Jain
2022-05-12 6:30 ` Anand Jain
2022-05-05 15:34 ` 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=c026bdcc-3e06-cf85-b1af-bcc617be7ff9@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox