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

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?


  reply	other threads:[~2025-01-31  8:08 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 [this message]
2025-01-31 12:50     ` Brian Foster
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=Z5yE419RpS52yTbq@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox