All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: Nikolay Borisov <nborisov@suse.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: Mon, 21 Sep 2020 22:32:40 +0200	[thread overview]
Message-ID: <20200921203240.GV6756@twin.jikos.cz> (raw)
In-Reply-To: <SN4PR0401MB35988E131C20F42AF70484FA9B3A0@SN4PR0401MB3598.namprd04.prod.outlook.com>

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.

  reply	other threads:[~2020-09-21 20:33 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 [this message]
2020-09-23  6:24       ` Nikolay Borisov
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=20200921203240.GV6756@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@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.