Skip to contentSkip to conversation

generic/081: hack around the lvm unmount race

PATCH In review Christoph Hellwig 2 participants 2 messages Jan 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/081: hack around the lvm unmount race

This is butt ugly, but I see no better way than to wait a bit to work around the race between the weird umount in LVM, and the mount ismounted checks.

---
 tests/generic/081 | 2 ++
 1 file changed, 2 insertions(+)
tests/generic/081 +2 -0
index 11755d4..426766d 100755
@@ -35,6 +35,8 @@ _cleanup()
 	cd /
 	rm -f $tmp.*
 	# lvm may have umounted it on I/O error, but in case it does not
+	# wait a bit for lvm to settle, sigh..
+	sleep 2
 	$UMOUNT_PROG $mnt >/dev/null 2>&1
 	$LVM_PROG vgremove -f $vgname >>$seqres.full 2>&1
 	$LVM_PROG pvremove -f $SCRATCH_DEV >>$seqres.full 2>&1
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Christoph Hellwig

This is butt ugly, but I see no better way than to wait a bit to work around the race between the weird umount in LVM, and the mount ismounted checks.

---

Yes please:

I've had this test expunged from some setups simply because this failure can cause the entire test run to go off the rails.

Quoted 23 lines
 tests/generic/081 | 2 ++
 1 file changed, 2 insertions(+)
tests/generic/081 +2 -0
index 11755d4..426766d 100755
@@ -35,6 +35,8 @@ _cleanup()
 	cd /
 	rm -f $tmp.*
 	# lvm may have umounted it on I/O error, but in case it does not
+	# wait a bit for lvm to settle, sigh..
+	sleep 2
 	$UMOUNT_PROG $mnt >/dev/null 2>&1
 	$LVM_PROG vgremove -f $vgname >>$seqres.full 2>&1
 	$LVM_PROG pvremove -f $SCRATCH_DEV >>$seqres.full 2>&1
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html