Re: [PATCH v2] fstests: generic/366: add a new test case to verify if certain fio load will hang the filesystem

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]





在 2024/10/29 16:26, Zorro Lang 写道:
On Tue, Oct 29, 2024 at 10:05:25AM +1030, Qu Wenruo wrote:
[...]
+#
+. ./common/preamble
+_begin_fstest auto quick
                             ^^
                             rw

I think we can keep the "rw" group as g/095 does.

If that's the only missing part, mind to add that rw group when merging?

The remaining two points may not need modification, explained inlined.

+	# Now read is triggered on that folio.
+	# Btrfs will need to wait for any existing ordered extents in the folio range,
+	# that wait will also trigger writeback if the folio is dirty.
+	# That writeback will happen for range [48K, 64K), but since the whole folio
+	# is locked for read, writeback will also try to lock the same folio, causing
+	# a deadlock.
+	$FIO_PROG $fio_config --ignore_error=,EIO --output=$fio_out

Looks like this test doesn't mix DIO and buffered IO, so this EIO ignoring might not be
needed.

I'm not sure about the EIO part, but at least job2 and job3 are all
doing writes, one is buffered and the other is direct.
So it's still mixing both.


+	# umount before checking dmesg in case umount triggers any WARNING or Oops
+	_scratch_unmount
+
+	_check_dmesg _filter_aiodio_dmesg

This test removed mmap test part, so this dmesg filter might not be needed either ?
If so, don't need to import above "./common/filter" either.

Since it's still mixing buffered and direct IO, I can hit the aiodio
error message just like this:

[91619.077752] BTRFS warning (device dm-2): read-write for sector size
4096 with page size 65536 is experimental
[91619.086204] BTRFS info (device dm-2): checking UUID tree
[91619.473510] Page cache invalidation failure on direct I/O.  Possible
data corruption due to collision with buffered I/O!

So I'm afraid we need the filter too.

Thanks,
Qu


Others looks good to me.

Thanks,
Zorro

+
+	echo "=== fio $i/$iterations ===" >> $seqres.full
+	cat $fio_out >> $seqres.full
+done
+
+echo "Silence is golden"
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/366.out b/tests/generic/366.out
new file mode 100644
index 00000000..1fe90e06
--- /dev/null
+++ b/tests/generic/366.out
@@ -0,0 +1,2 @@
+QA output created by 366
+Silence is golden
--
2.46.0










[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux