[LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement
Avinesh Kumar
avinesh.kumar@suse.com
Thu Nov 19 14:01:21 CET 2026
Hi,
On 11/17/26 1:56 PM, Wake Liu via ltp wrote:
> Commit ecf418722780 ("inode01: increase dev_min_size to fit the peak
> usage in parallel scenario") raised dev_min_size from the default 300MB
> to 512MB because mkfs.exfat defaulted to a 32KB cluster size on volumes
> larger than 256MB, providing only ~9,600 clusters on a 300MB device for
> the ~10,925 objects created across the 5 parallel workers.
>
> Subsequently, commit 4bf4da8c6fda ("inode01: Configure 4KB cluster size
> on exfat to prevent ENOSPC") explicitly configured mkfs.exfat with a 4KB
> cluster size (-c 4K). With 4KB clusters, the 10,925 objects consume
> under 50MB at peak, and the default 300MB loop device provides ~76,800
> clusters on exfat, which is more than sufficient for all supported
> filesystems.
>
> Drop the redundant .dev_min_size = 512 setting so inode01 uses the
> default 300MB device size and avoids unnecessary ENOSPC failures when
> allocating the loop backing file on storage-constrained systems.
>
> Signed-off-by: Wake Liu <wakel@google.com>
> ---
> testcases/kernel/fs/inode/inode01.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/testcases/kernel/fs/inode/inode01.c b/testcases/kernel/fs/inode/inode01.c
> index e7190fc99..09e0e9da0 100644
> --- a/testcases/kernel/fs/inode/inode01.c
> +++ b/testcases/kernel/fs/inode/inode01.c
> @@ -260,7 +260,6 @@ static struct tst_test test = {
> {}
> },
> .needs_root = 1,
> - .dev_min_size = 512,
> .forks_child = 1,
> .needs_checkpoints = 1,
> .timeout = 300,
Unfortunately this change breaks things on tmpfs on systems with 64k
pagesize, as library sets
if (!tst_test->dev_min_size)
tmpfs_size = 32;
tst_test.c:2005: TINFO: === Testing on tmpfs ===
tst_test.c:1305: TINFO: Skipping mkfs for TMPFS filesystem
tst_test.c:1281: TINFO: Limiting tmpfs size to 32MB
tst_test.c:1317: TINFO: Mounting ltp-tmpfs to
/var/tmp/LTP_inourxWrA/mntpoint fstyp=tmpfs flags=0
inode01.c:241: TINFO: Testing single-process small tree (depth=3
fanout=4 repetitions=100 workers=1)
inode01.c:228: TPASS: Created and verified 28 objects in mntpoint/inode.5861
inode01.c:241: TINFO: Testing parallel larger trees (depth=6 fanout=6
repetitions=8 workers=5)
inode01.c:61: TBROK: write(3,0x7ffffd679118,73) failed: ENOSPC (28)
so either we need to revert this patch or we can do this lib change
(lib/tst_test.c)
- if (!tst_test->dev_min_size)
- tmpfs_size = 32;
- else
+ if (!tst_test->dev_min_size) {
+ /*
+ * tmpfs charges its size in whole pages, so 32MB is only 512
+ * pages with 64kB pages instead of 8192 with 4kB ones. Scale
+ * it to keep the same page budget on every architecture.
+ */
+ tmpfs_size = 32 * MAX(getpagesize() / 4096, 1);
+ } else {
tmpfs_size = tdev.size;
+ }
--
Avinesh
More information about the ltp
mailing list