Re: [PATCH v8] ntfs: trim the sizes after a short write

From: Zhan Xusheng

Date: Sun Nov 22 2026 - 22:10:04 EST


Hi Ernest,

On Sun, Nov 22, 2026 at 06:21:27PM +0000, Ernest Borowski wrote:
> Zeroing from a worker when the caller has a fatal signal pending fixes
> it. Something like this on top of v8:

Thanks. I reproduced it on ntfs-next f674e4b6c315 at 4K and 64K
clusters: with v8 the page stored through the mapping reads back as
zeroes, with your diff it is kept, and v8's other tests give the same
results.

I'd like to fold the diff into v9 as it is. Can I add your
Co-developed-by and Signed-off-by for it?

> Patch 7 has the same kind of helper in fs/ntfs/iomap.c, so whichever
> lands second can share one copy.

They zero through different paths: the one in patch 7 calls
ntfs_zero_range(), whose ntfs_iomap_valid() only accepts delalloc
mappings, while v8 zeroes allocated clusters past the initialized
size. A shared helper would need the zeroing function passed in.

Thanks,
Zhan Xusheng