From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: Fengnan Chang <fengnanchang@gmail.com>,
brauner@kernel.org, djwong@kernel.org, hch@infradead.org,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-ext4@vger.kernel.org, lidiangang@bytedance.com,
Fengnan Chang <changfengnan@bytedance.com>
Subject: Re: [PATCH] iomap: avoid memset iomap when iter is done
Date: Fri, 17 Apr 2026 00:27:30 -0700 [thread overview]
Message-ID: <aeHg4hUsVTxzm66I@infradead.org> (raw)
In-Reply-To: <aeDjui2LGSidEHcJ@bfoster>
On Thu, Apr 16, 2026 at 09:27:22AM -0400, Brian Foster wrote:
> This seems reasonable to me in principle, but it feels a little odd to
> leave a reset helper that doesn't really do a "reset."
Agreed.
> I wonder if this
> should be refactored into an iomap_iter_complete() (i.e. "complete an
> iteration") helper that includes the ret assignment logic just above the
> reset call and returns it, and then maybe leave a oneline comment above
> the memset so somebody doesn't blindly fold it back in the future. So
> for example:
What about just killing iomap_iter_reset_iomap in it's current form
instead? Move the batch reset logic into a little helper if we care,
and just inline the rest into the only claler to side-step the issue.
next prev parent reply other threads:[~2026-04-17 8:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 3:06 [PATCH] iomap: avoid memset iomap when iter is done Fengnan Chang
2026-04-16 13:27 ` Brian Foster
2026-04-16 15:27 ` Darrick J. Wong
2026-04-16 22:42 ` Dave Chinner
2026-04-17 2:15 ` changfengnan
2026-04-16 23:20 ` Mateusz Guzik
2026-04-17 2:19 ` changfengnan
2026-04-17 7:27 ` Christoph Hellwig [this message]
2026-04-17 9:15 ` changfengnan
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=aeHg4hUsVTxzm66I@infradead.org \
--to=hch@infradead.org \
--cc=bfoster@redhat.com \
--cc=brauner@kernel.org \
--cc=changfengnan@bytedance.com \
--cc=djwong@kernel.org \
--cc=fengnanchang@gmail.com \
--cc=lidiangang@bytedance.com \
--cc=linux-ext4@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox