[LTP] [PATCH] inode01: Configure 4KB cluster size on exfat to prevent ENOSPC

Kinshu Agrawal (xWF) kinshu@xwf.google.com
Tue Aug 18 18:54:01 CEST 2026


In the multi-process scenario, inode01 creates 10,920 objects (files
and directories) across 5 parallel workers.

On Android, mkfs.exfat (exfatprogs) defaults to a 128KB cluster size
on volumes <= 32GB. On a 512MB test volume, this provides only 4,080
clusters, causing the test to run out of clusters and fail with ENOSPC.

Fix this by configuring exfat to format with a 4KB cluster size (-c 4K)
via the struct tst_fs mkfs_opts field.

Signed-off-by: Kinshu Agrawal <kinshu@google.com>
---
 testcases/kernel/fs/inode/inode01.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/kernel/fs/inode/inode01.c
b/testcases/kernel/fs/inode/inode01.c
index d41ff2c62..7fccaaf95 100644
--- a/testcases/kernel/fs/inode/inode01.c
+++ b/testcases/kernel/fs/inode/inode01.c
@@ -255,6 +255,10 @@ static struct tst_test test = {
  .mntpoint = MNTPOINT,
  .mount_device = 1,
  .all_filesystems = 1,
+ .filesystems = (struct tst_fs[]) {
+ {.type = "exfat", .mkfs_opts = (const char *const[]) {"-c", "4K", NULL}},
+ {}
+ },
  .needs_root = 1,
  .dev_min_size = 512,
  .forks_child = 1,
--


More information about the ltp mailing list