From: lan@suse.com
To: fstests@vger.kernel.org
Cc: An Long <lan@suse.com>
Subject: [PATCH] generic/095: ignore EBUSY for job5 on NFS
Date: Mon, 12 Oct 2026 10:57:07 +0800 [thread overview]
Message-ID: <20261012025707.16720-1-lan@suse.com> (raw)
From: An Long <lan@suse.com>
On NFS, the buffered read in job5 occasionally fails with EBUSY:
fio: io_u error on file <dir>/file2: Device or resource busy: read ...
This most likely happens because the client has to invalidate its page
cache before reading a file that other jobs may have modified, and that
cannot complete while those jobs keep mixing direct, buffered and mmap
writes on the same files.
Make this error ignorable for job5 reads only, and only when testing
NFS, so that unexpected errors from other jobs or other filesystems are
still reported. Since ignore_error given on the fio command line applies
to all jobs, move it into the job file, where it can be overridden per
job. Behaviour for other filesystems and jobs is unchanged.
Signed-off-by: An Long <lan@suse.com>
---
tests/generic/095 | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/tests/generic/095 b/tests/generic/095
index 828274fd..53afb1de 100755
--- a/tests/generic/095
+++ b/tests/generic/095
@@ -25,12 +25,25 @@ numjobs=$((5 * LOAD_FACTOR))
fio_config=$tmp.fio
fio_out=$tmp.fio.out
blksz=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV`
+
+# There's a known EIO failure to report collisions between directio and buffered
+# writes to userspace, refer to upstream linux 5a9d929d6e13. So ignore EIO error
+# at here.
+#
+# On NFS, the buffered read in job5 may fail with EBUSY, most likely because
+# the client has to invalidate its page cache before reading a stale file, as
+# the file may have been modified by other jobs doing writes, and that cannot
+# complete while those jobs are mixing direct, buffered and mmap I/O on the same
+# files. Ignore EBUSY on reads for job5 on NFS.
+job5_ignore_error=",EIO"
+[ "$FSTYP" = "nfs" ] && job5_ignore_error="EBUSY,EIO"
cat >$fio_config <<EOF
[global]
bs=8k
iodepth=$iodepth
iodepth_batch=$iodepth_batch
randrepeat=1
+ignore_error=,EIO
size=1m
directory=$SCRATCH_MNT
numjobs=$numjobs
@@ -57,6 +70,7 @@ direct=1
rw=randwrite
filename=file1:file2
[job5]
+ignore_error=$job5_ignore_error
bs=1k
ioengine=sync
rw=randread
@@ -86,10 +100,7 @@ echo 'bs=$pagesize' >> $fio_config
_require_fio $fio_config
-# There's a known EIO failure to report collisions between directio and buffered
-# writes to userspace, refer to upstream linux 5a9d929d6e13. So ignore EIO error
-# at here.
-$FIO_PROG $fio_config --ignore_error=,EIO --output=$fio_out
+$FIO_PROG $fio_config --output=$fio_out
cat $fio_out >> $seqres.full
echo "Silence is golden"
--
2.51.0
reply other threads:[~2026-10-12 2:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261012025707.16720-1-lan@suse.com \
--to=lan@suse.com \
--cc=fstests@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox