All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v2 04/12] dax: advance the iomap_iter in the read/write path
Date: Thu, 20 Feb 2025 09:58:28 -0500	[thread overview]
Message-ID: <Z7dDFDXSi-gpw48O@bfoster> (raw)
In-Reply-To: <20250219223344.GJ21808@frogsfrogsfrogs>

On Wed, Feb 19, 2025 at 02:33:44PM -0800, Darrick J. Wong wrote:
> On Wed, Feb 19, 2025 at 12:50:42PM -0500, Brian Foster wrote:
> > DAX reads and writes flow through dax_iomap_iter(), which has one or
> > more subtleties in terms of how it processes a range vs. what is
> > specified in the iomap_iter. To keep things simple and remove the
> > dependency on iomap_iter() advances, convert a positive return from
> > dax_iomap_iter() to the new advance and status return semantics. The
> > advance can be pushed further down in future patches.
> > 
> > Signed-off-by: Brian Foster <bfoster@redhat.com>
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> Not sure why this and the next patch are split up but it's fsdax so meh.
> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
> 

Heh.. mainly just out of caution and bisectability. The subsequent patch
took a bit of fighting for me to get right and this patch served as a
nice baseline to isolate changes in the DAX I/O path from the functional
iomap change, since this patch is relatively trivial.

Thanks for the reviews..

Brian

> --D
> 
> > ---
> >  fs/dax.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/fs/dax.c b/fs/dax.c
> > index 21b47402b3dc..296f5aa18640 100644
> > --- a/fs/dax.c
> > +++ b/fs/dax.c
> > @@ -1585,8 +1585,12 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
> >  	if (iocb->ki_flags & IOCB_NOWAIT)
> >  		iomi.flags |= IOMAP_NOWAIT;
> >  
> > -	while ((ret = iomap_iter(&iomi, ops)) > 0)
> > +	while ((ret = iomap_iter(&iomi, ops)) > 0) {
> >  		iomi.processed = dax_iomap_iter(&iomi, iter);
> > +		if (iomi.processed > 0)
> > +			iomi.processed = iomap_iter_advance(&iomi,
> > +							    &iomi.processed);
> > +	}
> >  
> >  	done = iomi.pos - iocb->ki_pos;
> >  	iocb->ki_pos = iomi.pos;
> > -- 
> > 2.48.1
> > 
> > 
> 


  reply	other threads:[~2025-02-20 14:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 17:50 [PATCH v2 00/12] iomap: incremental advance conversion -- phase 2 Brian Foster
2025-02-19 17:50 ` [PATCH v2 01/12] iomap: advance the iter directly on buffered read Brian Foster
2025-02-19 22:22   ` Darrick J. Wong
2025-02-19 22:31     ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 02/12] iomap: advance the iter on direct I/O Brian Foster
2025-02-19 22:22   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 03/12] iomap: convert misc simple ops to incremental advance Brian Foster
2025-02-19 22:24   ` Darrick J. Wong
2025-02-19 22:31     ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 04/12] dax: advance the iomap_iter in the read/write path Brian Foster
2025-02-19 22:33   ` Darrick J. Wong
2025-02-20 14:58     ` Brian Foster [this message]
2025-02-19 17:50 ` [PATCH v2 05/12] dax: push advance down into dax_iomap_iter() for read and write Brian Foster
2025-02-19 22:34   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 06/12] dax: advance the iomap_iter on zero range Brian Foster
2025-02-19 22:34   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 07/12] dax: advance the iomap_iter on unshare range Brian Foster
2025-02-19 22:35   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 08/12] dax: advance the iomap_iter on dedupe range Brian Foster
2025-02-19 22:35   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 09/12] dax: advance the iomap_iter on pte and pmd faults Brian Foster
2025-02-19 22:36   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 10/12] iomap: remove unnecessary advance from iomap_iter() Brian Foster
2025-02-19 22:30   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 11/12] iomap: rename iomap_iter processed field to status Brian Foster
2025-02-19 22:30   ` Darrick J. Wong
2025-02-19 17:50 ` [PATCH v2 12/12] iomap: introduce a full map advance helper Brian Foster
2025-02-19 22:31   ` Darrick J. Wong
2025-02-20  9:10 ` [PATCH v2 00/12] iomap: incremental advance conversion -- phase 2 Christian Brauner
2025-02-20 14:59   ` Brian Foster

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=Z7dDFDXSi-gpw48O@bfoster \
    --to=bfoster@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@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.