[LTP] [PATCH v1 1/1] swap: Add exfat to filesystems requiring tst_fill_file
Andrea Cervesato
andrea.cervesato@suse.com
Wed Jun 17 16:59:15 CEST 2026
An update. I had to go through the code to understand if we are having
issues from our side. Indeed, there's a commit which is responsible for
this exfat behaviour and it's causing a regression-like issue:
bf1797960c20 - exfat: add fallocate FALLOC_FL_ALLOCATE_RANGE support
tst_prealloc_size_fd() is called by make_swapfile() which is called by our
swapon/swapoff testing suites. Inside it we use fallocate() that is now
supported by exfat and returns 0 after the kernel patch.
This naturally falls down into the next:
/* Fill the file if needed (specific to old xfs filesystems) */
if (tst_fs_type(swapfile) == TST_XFS_MAGIC) {
if (tst_fill_file(swapfile, 0, blk_size, blocks) != 0)
tst_brk_(file, lineno, TBROK, "Failed to fill swapfile");
}
but there's no data written and we get EINVAL at the end of the tests
because swapon() is using a file created with fallocate() instead.
The Jan assumption is correct and the patch as well, but it's strange
we can't reproduce it. The EINVAL is the expected behaviour in this case.
I'm just wondering how to implement it better.
First of all, we should mention the commit that introduced fallocate()
support into exfat inside the patch commit message.
Secondly, since the code was already working before v7.1, maybe we should
fill the file in exfat only for kernel >= 7.1. But I don't want to touch
the core library.
@Cyril WDYT?
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list