FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] generic/095: ignore EBUSY for job5 on NFS
@ 2026-10-12  2:57 lan
  0 siblings, 0 replies; only message in thread
From: lan @ 2026-10-12  2:57 UTC (permalink / raw)
  To: fstests; +Cc: An Long

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-12  2:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12  2:57 [PATCH] generic/095: ignore EBUSY for job5 on NFS lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox