From: Nikolay Borisov <nborisov@suse.com>
To: dsterba@suse.cz, Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 6/7] btrfs: Call submit_bio_hook directly for metadata pages
Date: Wed, 23 Sep 2020 09:24:49 +0300 [thread overview]
Message-ID: <f57deace-5457-9f8c-2aac-cdf32d39d619@suse.com> (raw)
In-Reply-To: <20200921203240.GV6756@twin.jikos.cz>
On 21.09.20 г. 23:32 ч., David Sterba wrote:
> On Mon, Sep 21, 2020 at 03:04:54PM +0000, Johannes Thumshirn wrote:
>> On 18/09/2020 15:34, Nikolay Borisov wrote:
>>> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
>>> index 8cabcb7642a9..4a00cfd4082f 100644
>>> --- a/fs/btrfs/extent_io.c
>>> +++ b/fs/btrfs/extent_io.c
>>> @@ -172,8 +172,8 @@ int __must_check submit_one_bio(struct bio *bio, int mirror_num,
>>> ret = btrfs_submit_data_bio(tree->private_data, bio, mirror_num,
>>> bio_flags);
>>> else
>>> - ret = tree->ops->submit_bio_hook(tree->private_data, bio,
>>> - mirror_num, bio_flags);
>>> + ret = btrfs_submit_metadata_bio(tree->private_data, bio,
>>> + mirror_num, bio_flags);
>>>
>>
>>
>> Hmm we could even turn this into a little helper calling either
>> btrfs_submit_data_bio or btrfs_submit_metadata_bio. But that's just stylistic
>> preference I guess.
>
> Yeah a helper could be here but I think it's fine without that extra
> indirection, the code is clear that for data inode it's some "data"
> function, with the same set of parameters. If there's just one location
> switching the two, the helper would not help much IMHO.
>
<NOD> The idea here is to have less functions in the way, if there were
more places that this change was necessary I would have gone the helper
way.
next prev parent reply other threads:[~2020-09-23 6:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 13:34 [PATCH 0/7] Remove struct extent_io_ops Nikolay Borisov
2020-09-18 13:34 ` [PATCH 1/7] btrfs: Don't call readpage_end_io_hook for the btree inode Nikolay Borisov
2020-09-18 13:41 ` Nikolay Borisov
2020-09-21 14:54 ` Johannes Thumshirn
2020-09-21 17:45 ` David Sterba
2020-09-23 6:29 ` Nikolay Borisov
2020-09-23 14:10 ` David Sterba
2020-09-18 13:34 ` [PATCH 2/7] btrfs: Remove extent_io_ops::readpage_end_io_hook Nikolay Borisov
2020-09-21 14:58 ` Johannes Thumshirn
2020-09-18 13:34 ` [PATCH 3/7] btrfs: Call submit_bio_hook directly in submit_one_bio Nikolay Borisov
2020-09-18 13:34 ` [PATCH 4/7] btrfs: Don't opencode is_data_inode in end_bio_extent_readpage Nikolay Borisov
2020-09-21 20:29 ` David Sterba
2020-09-23 6:23 ` Nikolay Borisov
2020-09-23 14:11 ` David Sterba
2020-09-18 13:34 ` [PATCH 5/7] btrfs: Stop calling submit_bio_hook for data inodes Nikolay Borisov
2020-09-18 13:34 ` [PATCH 6/7] btrfs: Call submit_bio_hook directly for metadata pages Nikolay Borisov
2020-09-21 15:04 ` Johannes Thumshirn
2020-09-21 20:32 ` David Sterba
2020-09-23 6:24 ` Nikolay Borisov [this message]
2020-09-18 13:34 ` [PATCH 7/7] btrfs: Remove struct extent_io_ops Nikolay Borisov
2020-09-21 20:38 ` David Sterba
2020-09-23 6:25 ` Nikolay Borisov
2020-09-23 14:19 ` David Sterba
2020-09-23 14:23 ` Nikolay Borisov
2020-09-23 15:09 ` David Sterba
2020-09-21 15:05 ` [PATCH 0/7] " Johannes Thumshirn
2020-09-24 11:35 ` 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=f57deace-5457-9f8c-2aac-cdf32d39d619@suse.com \
--to=nborisov@suse.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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