All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ojaswin Mujoo <ojaswin@linux.ibm.com>
To: Zorro Lang <zlang@redhat.com>, fstests@vger.kernel.org
Cc: Disha Goel <disgoel@linux.ibm.com>
Subject: [PATCH] generic/645: Confirm availability of free inodes
Date: Wed, 17 Jun 2026 11:12:16 +0530	[thread overview]
Message-ID: <20260617054216.3186441-1-ojaswin@linux.ibm.com> (raw)

When running generic/645 with ext4 using 64k block size + bigalloc, the
test fails with ENOSPC because the filesystem runs out of inodes before
the test completes.

The test creates approximately 10,001 files, however, in this particular
configuration a standard 5G FS only has around ~5100 inodes resulting in
the ENOSPC failure.

Add a check using _get_free_inode() to verify sufficient inodes are
available before running the test, else skip it.

Reported-by: Disha Goel <disgoel@linux.ibm.com>
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
---
 tests/generic/645 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/generic/645 b/tests/generic/645
index d6eb75e6..944b33db 100755
--- a/tests/generic/645
+++ b/tests/generic/645
@@ -19,6 +19,12 @@ _require_chown
 _wants_kernel_commit dacfd001eaf2 \
 	"fs/mnt_idmapping.c: Return -EINVAL when no map is written"
 
+_free_inodes=$(_get_free_inode $TEST_DIR)
+if [ $_free_inodes -ne 0 ] && [ $_free_inodes -lt 10001 ]; then
+	_notrun "Insufficient free inodes ($_free_inodes), need at least 10001"
+fi
+
 echo "Silence is golden"
 
 $here/src/vfs/vfstest --test-nested-userns \
-- 
2.53.0


             reply	other threads:[~2026-06-17  5:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17  5:42 Ojaswin Mujoo [this message]
2026-06-25 18:42 ` [PATCH] generic/645: Confirm availability of free inodes Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260617054216.3186441-1-ojaswin@linux.ibm.com \
    --to=ojaswin@linux.ibm.com \
    --cc=disgoel@linux.ibm.com \
    --cc=fstests@vger.kernel.org \
    --cc=zlang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.