All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Dave Chinner <david@fromorbit.com>,
	"Darrick J . Wong" <darrick.wong@oracle.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/12] iomap: lift the xfs writeback code to iomap
Date: Wed, 16 Oct 2019 08:08:13 -0400	[thread overview]
Message-ID: <20191016120813.GA40434@bfoster> (raw)
In-Reply-To: <20191016074836.GB23696@lst.de>

On Wed, Oct 16, 2019 at 09:48:36AM +0200, Christoph Hellwig wrote:
> On Wed, Oct 16, 2019 at 09:07:21AM +1100, Dave Chinner wrote:
...
> > > +/*
> > > + * Submit the bio for an ioend. We are passed an ioend with a bio attached to
> > > + * it, and we submit that bio. The ioend may be used for multiple bio
> > > + * submissions, so we only want to allocate an append transaction for the ioend
> > > + * once.  In the case of multiple bio submission, each bio will take an IO
> > 
> > This needs to be changed to describe what wpc->ops->submit_ioend()
> > is used for rather than what XFS might use this hook for.
> 
> True.  The real documentation now is in the header near the ops defintion,
> but I'll update this one to make more sense as well.
> 
> > > +static int
> > > +iomap_submit_ioend(struct iomap_writepage_ctx *wpc, struct iomap_ioend *ioend,
> > > +		int error)
> > > +{
> > > +	ioend->io_bio->bi_private = ioend;
> > > +	ioend->io_bio->bi_end_io = iomap_writepage_end_bio;
> > > +
> > > +	if (wpc->ops->submit_ioend)
> > > +		error = wpc->ops->submit_ioend(ioend, error);
> > 
> > I'm not sure that "submit_ioend" is the best name for this method,
> > as it is a pre-bio-submission hook, not an actual IO submission
> > method. "prepare_ioend_for_submit" is more descriptive, but probably
> > too long. wpc->ops->prepare_submit(ioend, error) reads pretty well,
> > though...
> 
> Not a huge fan of that name either, but Brian complained.  Let's hold
> a popular vote for a name and see if we have a winner.
> 

Just to recall, I suggested something like ->pre_submit_ioend() back in
v5. Short of that, I asked for extra comments to clearly document
semantics which I believe Christoph added to the header, and I acked (it
looks like the handful of R-B tags I sent were all dropped btw...? Have
all of those patches changed?).

To give my .02 on the naming thing, I care about functional clarity more
than aesthetics. In that regard, ->submit_ioend() reads like a
submission hook and thus sounds rather confusing to me when I don't see
it actually submit anything. ->pre_submit_ioend(), ->prepare_ioend() or
->prepare_submission() all clearly indicate semantics to me, so I'm good
with any of those over ->submit_ioend(). :)

Brian

> As for the grammar comments - all this is copied over as-is.  I'll add
> another patch to fix that up.
> 

  reply	other threads:[~2019-10-16 12:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 15:43 lift the xfs writepage code into iomap v7 Christoph Hellwig
2019-10-15 15:43 ` [PATCH 01/12] xfs: initialize iomap->flags in xfs_bmbt_to_iomap Christoph Hellwig
2019-10-15 18:00   ` Darrick J. Wong
2019-10-15 21:20   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 02/12] xfs: set IOMAP_F_NEW more carefully Christoph Hellwig
2019-10-15 18:01   ` Darrick J. Wong
2019-10-15 21:21   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 03/12] xfs: use a struct iomap in xfs_writepage_ctx Christoph Hellwig
2019-10-15 21:23   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 04/12] xfs: refactor the ioend merging code Christoph Hellwig
2019-10-15 17:56   ` Darrick J. Wong
2019-10-15 17:59     ` Christoph Hellwig
2019-10-15 21:26   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 05/12] xfs: turn io_append_trans into an io_private void pointer Christoph Hellwig
2019-10-15 18:02   ` Darrick J. Wong
2019-10-15 21:28   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 06/12] xfs: remove the fork fields in the writepage_ctx and ioend Christoph Hellwig
2019-10-15 18:05   ` Darrick J. Wong
2019-10-15 21:31   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 07/12] iomap: zero newly allocated mapped blocks Christoph Hellwig
2019-10-15 21:32   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 08/12] iomap: lift the xfs readpage / readpages tracing to iomap Christoph Hellwig
2019-10-15 18:06   ` Darrick J. Wong
2019-10-15 21:35   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 09/12] iomap: lift the xfs writeback code " Christoph Hellwig
2019-10-15 18:40   ` Darrick J. Wong
2019-10-16  7:43     ` Christoph Hellwig
2019-10-15 22:07   ` Dave Chinner
2019-10-16  5:09     ` Darrick J. Wong
2019-10-16  7:48     ` Christoph Hellwig
2019-10-16 12:08       ` Brian Foster [this message]
2019-10-16  8:10     ` Christoph Hellwig
2019-10-15 15:43 ` [PATCH 10/12] iomap: warn on inline maps in iomap_writepage_map Christoph Hellwig
2019-10-15 22:08   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 11/12] iomap: move struct iomap_page out of iomap.h Christoph Hellwig
2019-10-15 22:09   ` Dave Chinner
2019-10-15 15:43 ` [PATCH 12/12] iomap: cleanup iomap_ioend_compare Christoph Hellwig
2019-10-15 17:57   ` Darrick J. Wong
2019-10-15 22:10   ` Dave Chinner

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=20191016120813.GA40434@bfoster \
    --to=bfoster@redhat.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=agruenba@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@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 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.