public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Naohiro Aota <Naohiro.Aota@wdc.com>
Cc: "dsterba@suse.cz" <dsterba@suse.cz>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/4] btrfs: zoned: consolidate zone finish function
Date: Fri, 29 Apr 2022 20:41:55 +0200	[thread overview]
Message-ID: <20220429184155.GG18596@twin.jikos.cz> (raw)
In-Reply-To: <20220429045632.jlt2fn6chxubycbp@naota-xeon>

On Fri, Apr 29, 2022 at 04:56:33AM +0000, Naohiro Aota wrote:
> On Thu, Apr 28, 2022 at 06:11:03PM +0200, David Sterba wrote:
> > On Fri, Apr 29, 2022 at 12:02:15AM +0900, Naohiro Aota wrote:
> > >  1 file changed, 54 insertions(+), 73 deletions(-)
> > > 
> > > diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> > > index 997a96d7a3d5..9cddafe78fb1 100644
> > > --- a/fs/btrfs/zoned.c
> > > +++ b/fs/btrfs/zoned.c
> > > @@ -1879,20 +1879,14 @@ bool btrfs_zone_activate(struct btrfs_block_group *block_group)
> > >  	return ret;
> > >  }
> > >  
> > > -int btrfs_zone_finish(struct btrfs_block_group *block_group)
> > > +static int __btrfs_zone_finish(struct btrfs_block_group *block_group, bool nowait)
> > 
> > Can you please avoid using __ for functions? Eg. the main function can
> > be btrfs_zone_finish(taking 2 parameters) and the exported one being
> > btrfs_zone_finish_nowait reflecting the preset parameter and also making
> > the 'nowait' semantics clear.
> 
> But, we exports both btrfs_zone_finish() (the waiting variant) and
> btrfs_zone_finish_endio() (the nowait variant + checking the left space
> after write). How about "do_zone_finish(block_group, bool nowait)" as a
> main function and "btrfs_zone_finish(block_group)" and
> "btrfs_zone_finish_endio(block_group)" ?

Yeah, do_zone_finish works as well.

  reply	other threads:[~2022-04-29 18:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 15:02 [PATCH 0/4] btrfs: zoned: fixes for zone finishing Naohiro Aota
2022-04-28 15:02 ` [PATCH 1/4] btrfs: zoned: consolidate zone finish function Naohiro Aota
2022-04-28 16:11   ` David Sterba
2022-04-29  4:56     ` Naohiro Aota
2022-04-29 18:41       ` David Sterba [this message]
2022-04-28 15:02 ` [PATCH 2/4] btrfs: zoned: finish BG when there are no more allocatable bytes left Naohiro Aota
2022-04-29 11:55   ` Pankaj Raghav
2022-05-02 18:40     ` Naohiro Aota
2022-04-28 15:02 ` [PATCH 3/4] btrfs: zoned: properly finish block group on metadata write Naohiro Aota
2022-04-28 15:02 ` [PATCH 4/4] btrfs: zoned: zone finish unused block group Naohiro Aota

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=20220429184155.GG18596@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=Naohiro.Aota@wdc.com \
    --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