From: Christoph Hellwig <hch@infradead.org>
To: Breno Leitao <leitao@debian.org>
Cc: Christian Brauner <brauner@kernel.org>,
Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,
Pankaj Raghav <p.raghav@samsung.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
Luis Chamberlain <mcgrof@kernel.org>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH] iomap: don't update i_size of block devices on buffered write
Date: Sun, 15 Nov 2026 22:01:46 -0800 [thread overview]
Message-ID: <avqcSintiX4fhNUB@infradead.org> (raw)
In-Reply-To: <20261113-iomap-bdev-isize-v1-1-699603b589da@debian.org>
On Fri, Nov 13, 2026 at 07:02:17AM -0800, Breno Leitao wrote:
> - if (pos + written > old_size &&
> + if (pos + written > old_size && !S_ISBLK(iter->inode->i_mode) &&
> !(iter->iomap.flags & IOMAP_F_FSVERITY)) {
> i_size_write(iter->inode, pos + written);
> iter->iomap.flags |= IOMAP_F_SIZE_CHANGED;
> }
> __iomap_put_folio(iter, write_ops, written, folio);
>
> - if (old_size < pos && !(iter->iomap.flags & IOMAP_F_FSVERITY))
> + if (old_size < pos && !S_ISBLK(iter->inode->i_mode) &&
> + !(iter->iomap.flags & IOMAP_F_FSVERITY))
Please add a function scope "update_isize" variable instead of
duplicating these checks. Otherwise looks good.
prev parent reply other threads:[~2026-11-16 6:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 15:02 [PATCH] iomap: don't update i_size of block devices on buffered write Breno Leitao
2026-11-16 6:01 ` Christoph Hellwig [this message]
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=avqcSintiX4fhNUB@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=hare@suse.de \
--cc=johannes.thumshirn@wdc.com \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
/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.