]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/484: force I/O to the data device for XFS
authorChristoph Hellwig <hch@lst.de>
Fri, 21 Nov 2025 07:10:05 +0000 (08:10 +0100)
committerZorro Lang <zlang@kernel.org>
Fri, 5 Dec 2025 07:46:17 +0000 (15:46 +0800)
Otherwise the error injection to the data device might not work as
expected.  For example in some zoned setups I see the failures in
a slightly different spot than expected without this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/484

index ec50735a5b584fd0dd5bf6adf317c57b17249200..0455efcb60007b9025626d5ebd463f61e22719e4 100755 (executable)
@@ -42,6 +42,9 @@ _scratch_mkfs > $seqres.full 2>&1
 _dmerror_init
 _dmerror_mount
 
+# ensure we are on the data device, as dm error inject the error there
+[ "$FSTYP" == "xfs" ] && _xfs_force_bdev data $SCRATCH_MNT
+
 # create file
 testfile=$SCRATCH_MNT/syncfs-reports-errors
 touch $testfile