All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH v3 3/7] iomap: refactor iter and advance continuation logic
Date: Fri, 31 Jan 2025 07:50:08 -0500	[thread overview]
Message-ID: <Z5zHAEJ6BEBdVHWB@bfoster> (raw)
In-Reply-To: <Z5yE419RpS52yTbq@infradead.org>

On Fri, Jan 31, 2025 at 12:08:03AM -0800, Christoph Hellwig wrote:
> On Thu, Jan 30, 2025 at 12:09:44PM -0500, Brian Foster wrote:
> > In preparation for future changes and more generic use of
> > iomap_iter_advance(), lift the high level iter continuation logic
> > out of iomap_iter_advance() into the caller. Also add some comments
> > and rework iomap_iter() to jump straight to ->iomap_begin() on the
> > first iteration.
> 
> It took me a bit to reoncile the commit log with the changes.
> 
> What this does is:
> 
>  1) factor out a iomap_iter_reset_iomap caller from iomap_iter_advance
>  2) pass an explicit count to iomap_iter_advance instead of derіving
>     it from iter->processed inside of iomap_iter_advance
>  3) only call iomap_iter_advance condititional on iter->iomap.length,
>     and thus skipping the code that is now in iomap_iter_reset_iomap
>     when iter->iomap.length is 0.
> 
> All this looks fine, although I wonder why we didn't do 3) before and
> if there is a risk of a regression for some weird corner case.
> 
> I hate nitpicking too much, but maybe split the three steps into
> separate patches so that 3) is clearly documented and can be bisected
> if problems arise?
> 
> 

No problem. I originally had this split up, then combined some of it
because the changes seemed trivial, then I think it became a little too
convoluted again. I think I should be able to split this back up into
two or three incremental patches..

Brian


  reply	other threads:[~2025-01-31 12:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-30 17:09 [PATCH v3 0/7] iomap: incremental per-operation iter advance Brian Foster
2025-01-30 17:09 ` [PATCH v3 1/7] iomap: split out iomap check and reset logic from " Brian Foster
2025-01-30 17:09 ` [PATCH v3 2/7] iomap: factor out iomap length helper Brian Foster
2025-01-30 17:09 ` [PATCH v3 3/7] iomap: refactor iter and advance continuation logic Brian Foster
2025-01-31  8:08   ` Christoph Hellwig
2025-01-31 12:50     ` Brian Foster [this message]
2025-01-30 17:09 ` [PATCH v3 4/7] iomap: support incremental iomap_iter advances Brian Foster
2025-01-30 17:09 ` [PATCH v3 5/7] iomap: advance the iter directly on buffered writes Brian Foster
2025-01-30 17:09 ` [PATCH v3 6/7] iomap: advance the iter directly on unshare range Brian Foster
2025-01-31  8:09   ` Christoph Hellwig
2025-01-30 17:09 ` [PATCH v3 7/7] iomap: advance the iter directly on zero range Brian Foster
2025-01-31  8:09   ` Christoph Hellwig

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=Z5zHAEJ6BEBdVHWB@bfoster \
    --to=bfoster@redhat.com \
    --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.