Re: [PATCH v5 06/14] ntfs: update file operations

From: Christoph Hellwig

Date: Tue Jan 20 2026 - 01:42:11 EST


On Tue, Jan 20, 2026 at 02:11:24PM +0900, Namjae Jeon wrote:
> By modifying iomap_begin, it seems possible to implement it using
> iomap_seek_hole/data without introducing a new IOMAP_xxx type.

Note that you can also use different iomap ops for different operations
if needed.

> Since NTFS does not support multiple unwritten extents, all
> pre-allocated regions must, in principle, be treated as DATA, not
> HOLE. However, in the current implementation, region #2 is mapped as
> IOMAP_UNWRITTEN, so iomap_seek_data incorrectly interprets this region
> as a hole. It would be better to map region #2 as IOMAP_MAPPED for the
> seek operation.

So basically it optimizes for the case of appending on the end.

Can you add the above to a code comment where you set IOMAP_UNWRITTEN?