[PATCH 3/4] dmflakey: don't run dmflakey tests with an external log device

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



dmflakey works by dropping all writes before unmounting to simulate a
crash/power loss.  This doesn't work if there is an external log
device, since we only drop writes to the primary block device, and not
the external log device.  Fixing this for real would require somehow
arranging to atomically loading a new dmflakey table for two block
devices at the same time, so for now, just skip tests using dmflakey
if the external log device is enabled.

Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
---
 common/dmflakey | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/dmflakey b/common/dmflakey
index 52da3b10..c2be78e9 100644
--- a/common/dmflakey
+++ b/common/dmflakey
@@ -12,6 +12,10 @@ _init_flakey()
 {
 	# Scratch device
 	local BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+
+	if test "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ; then
+		_notrun "dmflakey tests don't work with an external log device"
+	fi
 	FLAKEY_DEV=/dev/mapper/flakey-test
 	FLAKEY_TABLE="0 $BLK_DEV_SIZE flakey $SCRATCH_DEV 0 180 0"
 	FLAKEY_TABLE_DROP="0 $BLK_DEV_SIZE flakey $SCRATCH_DEV 0 0 180 1 drop_writes"
-- 
2.31.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