[PATCH 3/9 v5] common/rc: add _require_norecovery

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



This patch adds checking code whether filesystem supports norecovery mount
option or not.
And let use this into the following xfs test.

 xfs/200         (recovery vs ro-block device)

* Currently, norecovery mount option is used by xfs only. But some of log-based
filesystems (e.g., f2fs) are able to support it later.

Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
---
 common/rc     | 8 ++++++++
 tests/xfs/200 | 1 +
 2 files changed, 9 insertions(+)

diff --git a/common/rc b/common/rc
index 078d3ca..395bf6c 100644
--- a/common/rc
+++ b/common/rc
@@ -2332,6 +2332,14 @@ _require_scratch_shutdown()
 	_scratch_unmount
 }
 
+# Does norecovery support by this fs?
+_require_norecovery()
+{
+	_scratch_mount -o ro,norecovery || \
+		_notrun "$FSTYP does not support norecovery"
+	_scratch_unmount
+}
+
 # Does fiemap support?
 _require_fiemap()
 {
diff --git a/tests/xfs/200 b/tests/xfs/200
index c62d2b8..bd6d0fd 100755
--- a/tests/xfs/200
+++ b/tests/xfs/200
@@ -46,6 +46,7 @@ _supported_os Linux
 
 _require_scratch_nocheck
 _require_scratch_shutdown
+_require_norecovery
 
 _scratch_mkfs_xfs >/dev/null 2>&1
 
-- 
2.1.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