[LTP] [PATCH v1] swapon04: Settle udev after mkswap to prevent tmpfs hole filling

Cyril Hrubis chrubis@suse.cz
Thu Nov 12 11:49:56 CET 2026


Hi!
> When mkswap formats and closes the loop device, systemd-udevd
> asynchronously runs blkid probing on the device. On kernels prior to
> 5.18, tmpfs shmem_file_read_iter() treats non-iovec read iterators
> (!iter_is_iovec(to)) as stacking filesystem reads, allocating real
> zero-filled pages into holes (this behavior get fixed by commit
> 56a8c8eb1eaf ("tmpfs: do not allocate pages on read")).

Also when this has been fixed by 5.18 we shouldn't apply the fix for
5.18+ otherwise this would mask regressions.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list