From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] iomap: replace folio_batch allocation with stack allocation
Date: Wed, 12 Nov 2025 00:39:40 -0800 [thread overview]
Message-ID: <aRRHzBlw6pc3cQjr@infradead.org> (raw)
In-Reply-To: <20251111175047.321869-1-bfoster@redhat.com>
On Tue, Nov 11, 2025 at 12:50:47PM -0500, Brian Foster wrote:
> if (imap.br_state == XFS_EXT_UNWRITTEN &&
> offset_fsb < eof_fsb) {
> - loff_t len = min(count,
> - XFS_FSB_TO_B(mp, imap.br_blockcount));
> + loff_t foffset = offset, fend;
>
> - end = iomap_fill_dirty_folios(iter, offset, len);
> + fend = offset +
> + min(count, XFS_FSB_TO_B(mp, imap.br_blockcount));
> + iomap_flags |= iomap_fill_dirty_folios(iter, &foffset,
> + fend);
> end_fsb = min_t(xfs_fileoff_t, end_fsb,
> - XFS_B_TO_FSB(mp, end));
> + XFS_B_TO_FSB(mp, foffset));
Maybe it's just me, but I found the old calling convention a lot more
logic. Why not keep it and extend it for passing the flags as an
in/out argument? That would also keep the churn down a bit.
Otherwise the change looks good.
next prev parent reply other threads:[~2025-11-12 8:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 17:50 [PATCH] iomap: replace folio_batch allocation with stack allocation Brian Foster
2025-11-12 8:39 ` Christoph Hellwig [this message]
2025-11-12 12:35 ` Brian Foster
2025-11-12 12:53 ` 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=aRRHzBlw6pc3cQjr@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