[PATCH 1/8 v4] common/rc: add _require_scratch_shtudown

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



This is to detect whether filesystem supports shutdown feature or not.

Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
---
 common/rc | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/common/rc b/common/rc
index 5377ba0..438cd51 100644
--- a/common/rc
+++ b/common/rc
@@ -2320,6 +2320,17 @@ _require_freeze()
 	[ $result -eq 0 ] || _notrun "$FSTYP does not support freezing"
 }
 
+# Does shutdown work on this fs?
+_require_scratch_shutdown()
+{
+	[ -x src/godown ] || _notrun "src/godown executable not found"
+
+        _scratch_mount
+	src/godown -v -f $SCRATCH_MNT >/dev/null 2>&1 \
+		|| _notrun "$FSTYP does not support shutdown"
+	_scratch_unmount
+}
+
 # arg 1 is dev to remove and is output of the below eg.
 # ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev
 _devmgt_remove()
-- 
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