[PATCH] generic/459: Fix check for ro-remount in extN

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



Currently ,freeze failure caused by the lack of space can not
guarantee to remount extN filesystem in read-only mode.
We can add a touch to trigger the action which aborts journal
and ro-remounts the fs.

Signed-off-by: yang xu <xuyang.jy@xxxxxxxxxxxxxx>
---
 tests/generic/459 |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/generic/459 b/tests/generic/459
index eb05fb8..197d729 100755
--- a/tests/generic/459
+++ b/tests/generic/459
@@ -132,9 +132,11 @@ ret=$?
 #	- The filesystem turns into Read-Only and reject further writes
 #	- The filesystem stays in Read-Write mode, but can be frozen/thawed
 #	  without getting stuck.
-ISRO=$(_fs_options /dev/mapper/$vgname-$snapname | grep -w "ro")
-
-if [ $ret -ne 0 ]; then
+if [ $ret -ne 0 ]; then	
+	# fsfreeze failed, filesystem should reject further writes and remount
+	# as readonly
+	touch $SCRATCH_MNT/newfile >/dev/null 2>&1
+	ISRO=$(_fs_options /dev/mapper/$vgname-$snapname | grep -w "ro")
 	if [ -n "$ISRO" ]; then
 		echo "Test OK"
 	else
-- 
1.7.1



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



[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