generic/459: catch mount failure
PATCH 1/1 generic/459: catch mount failure
From: Dave Chinner <[email protected]>
Because if we don't, we freeze the root filesystem instead of $SCRATCH_MNT and it all goes downhill from there.
Signed-off-by Dave Chinner <[email protected]>
--- tests/generic/459 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/generic/459 +3 -1
@@ -77,7 +77,9 @@ _mkfs_dev /dev/mapper/$vgname-$lvname >>$seqres.full 2>&1 $LVM_PROG lvcreate -k n -s $vgname/$lvname \ -n $snapname >>$seqres.full 2>&1 -_mount /dev/mapper/$vgname-$snapname $SCRATCH_MNT +# Catch mount failure so we don't blindly go an freeze the root filesystem +# instead of lvm volume. +_mount /dev/mapper/$vgname-$snapname $SCRATCH_MNT || _fail "mount failed" # Consume all space available in the volume and freeze to ensure everything # required to make the fs consistent is flushed to disk.
Signature · 1 line
2.31.1
Quoted 6 lines · Dave Chinner
From: Dave Chinner <[email protected]>
Because if we don't, we freeze the root filesystem instead of $SCRATCH_MNT and it all goes downhill from there.
Signed-off-by Dave Chinner <[email protected]>
Heh, more mount failure whackamole. :(
Reviewed-by Darrick J. Wong <[email protected]>
--D
Quoted 22 lines
--- tests/generic/459 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/generic/459 +3
-1@@ -77,7 +77,9 @@ _mkfs_dev /dev/mapper/$vgname-$lvname >>$seqres.full 2>&1 $LVM_PROG lvcreate -k n -s $vgname/$lvname \ -n $snapname >>$seqres.full 2>&1 -_mount /dev/mapper/$vgname-$snapname $SCRATCH_MNT +# Catch mount failure so we don't blindly go an freeze the root filesystem +# instead of lvm volume. +_mount /dev/mapper/$vgname-$snapname $SCRATCH_MNT || _fail "mount failed" # Consume all space available in the volume and freeze to ensure everything # required to make the fs consistent is flushed to disk.Signature · 1 line
2.31.1