Re: [PATCH v4 01/11] iomap: introduce IOMAP_F_ZERO_TAIL flag
From: Namjae Jeon
Date: Fri May 22 2026 - 11:39:09 EST
On Fri, May 22, 2026 at 9:53 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> On Mon, May 18, 2026 at 08:46:55PM +0900, Namjae Jeon wrote:
> > In filesystems that maintain a separate Valid Data Length, such as exFAT
> > and NTFS, a partial write may start at or beyond the current valid_size and
> > extend it. In this case, the region after the previous valid_size but
> > within the same filesystem block is considered unwritten.
> >
> > This patch introduces IOMAP_F_ZERO_TAIL. When this flag is set in iomap,
> > __iomap_write_begin() will zero only the tail portion while preserving any
> > valid data before it in the same block.
> >
> > Without this tail zeroing, stale data in the unwritten portion of the block
> > can remain in the page cache. Subsequent reads can then return incorrect
> > contents from that region.
> >
> > Acked-by: Christoph Hellwig <hch@xxxxxx>
> > Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>
> > ---
>
> I've applied this. The branch is marked as shared with the exfat tree
> and will remain stable.
Thanks, Christian!