* [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement
@ 2026-11-17 12:56 Wake Liu via ltp
2026-11-18 9:44 ` Avinesh Kumar via ltp
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Wake Liu via ltp @ 2026-11-17 12:56 UTC (permalink / raw)
To: ltp; +Cc: Wake Liu
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,
--
2.56.0.679.gc527c65306-goog
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement
2026-11-17 12:56 [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement Wake Liu via ltp
@ 2026-11-18 9:44 ` Avinesh Kumar via ltp
2026-11-18 10:19 ` Cyril Hrubis
2026-11-19 13:01 ` Avinesh Kumar via ltp
2 siblings, 0 replies; 5+ messages in thread
From: Avinesh Kumar via ltp @ 2026-11-18 9:44 UTC (permalink / raw)
To: Wake Liu, ltp
Hi,
Reviewed-by: Avinesh Kumar <avinesh.kumar@suse.com>
Thanks,
Avinesh
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement
2026-11-17 12:56 [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement Wake Liu via ltp
2026-11-18 9:44 ` Avinesh Kumar via ltp
@ 2026-11-18 10:19 ` Cyril Hrubis
2026-11-19 13:01 ` Avinesh Kumar via ltp
2 siblings, 0 replies; 5+ messages in thread
From: Cyril Hrubis @ 2026-11-18 10:19 UTC (permalink / raw)
To: Wake Liu; +Cc: ltp
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement
2026-11-17 12:56 [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement Wake Liu via ltp
2026-11-18 9:44 ` Avinesh Kumar via ltp
2026-11-18 10:19 ` Cyril Hrubis
@ 2026-11-19 13:01 ` Avinesh Kumar via ltp
2026-11-19 13:48 ` Wake Liu via ltp
2 siblings, 1 reply; 5+ messages in thread
From: Avinesh Kumar via ltp @ 2026-11-19 13:01 UTC (permalink / raw)
To: Wake Liu; +Cc: ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement
2026-11-19 13:01 ` Avinesh Kumar via ltp
@ 2026-11-19 13:48 ` Wake Liu via ltp
0 siblings, 0 replies; 5+ messages in thread
From: Wake Liu via ltp @ 2026-11-19 13:48 UTC (permalink / raw)
To: Avinesh Kumar; +Cc: ltp
Hi Avinesh,
On Thu, Nov 19, 2026 at 02:01:21PM +0100, Avinesh Kumar wrote:
> Unfortunately this change breaks things on tmpfs on systems with 64k
> pagesize, as library sets
> if (!tst_test->dev_min_size)
> tmpfs_size = 32;
...
> 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;
> + }
Thanks for catching this!
I agree with updating limit_tmpfs_mount_size() in lib/tst_test.c rather
than reverting. Reverting to .dev_min_size = 512 would bring back loop
backing file ENOSPC failures on storage-constrained systems (and even
.dev_min_size = 300 would only provide 4800 pages with 64kB pages, still
short of the 5460 non-empty files created at peak in inode01).
Scaling the default 32MB tmpfs limit by getpagesize() / 4096 keeps a
consistent 8192-page budget across 4kB (32MB), 16kB (128MB, which also
matters for 16kB-page Android kernels), and 64kB (512MB) systems while
preserving the 2x MemAvailable TCONF guard for low-memory machines.
Since the fix and comment are yours, will you be sending this as a
formal patch? Feel free to add my:
Reviewed-by: Wake Liu <wakel@google.com>
(Or let me know if you prefer that I send it out with your
Suggested-by.)
Thanks,
Wake
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-19 13:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 12:56 [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement Wake Liu via ltp
2026-11-18 9:44 ` Avinesh Kumar via ltp
2026-11-18 10:19 ` Cyril Hrubis
2026-11-19 13:01 ` Avinesh Kumar via ltp
2026-11-19 13:48 ` Wake Liu via ltp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox