[LTP] [PATCH 2/2] tse_swap: Fill swapfile with zeroes on ntfs3
Cyril Hrubis
chrubis@suse.cz
Mon Nov 23 13:16:15 CET 2026
Hi!
> On ntfs3, fallocate() allocates clusters but does not change the valid
> data length.
>
> ntfs3 has no ->swap_activate(), so swapon() maps the file with
> generic_swapfile_activate() and ->bmap(). Since ntfs3 was converted to
> iomap in v7.0, ntfs_bmap() calls iomap_bmap(), which only returns a
> block number for IOMAP_MAPPED extents, while ntfs3 reports the range
> beyond the valid data length as IOMAP_UNWRITTEN. swapon() therefore
> rejects the file, and swapon01-03 and swapoff01-02 fail on ntfs3 with:
We had similar bug introduced in exfat code and it was fixed in kernel:
commit 03a43677ca91e3997355a13b1da6e47329b025e1
Author: Jan Polensky <japo@linux.ibm.com>
Date: Tue Jun 9 18:21:49 2026 +0900
exfat: add swap_activate support
Commit 07d67f3e9083 ("exfat: add iomap buffered I/O support")
converted exfat buffered I/O to iomap, but did not add a
.swap_activate handler to the address_space_operations.
Hence I assume this is a kernel bug.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list