diff mbox

[3/8,v4] common/rc: add _require_norecovery

Message ID 1423004840-45315-4-git-send-email-jaegeuk@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Jaegeuk Kim Feb. 3, 2015, 11:07 p.m. UTC
This patch adds checking code whether filesystem supports norecovery mount
option or not.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 common/rc | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Dave Chinner Feb. 5, 2015, 2:08 a.m. UTC | #1
On Tue, Feb 03, 2015 at 03:07:15PM -0800, Jaegeuk Kim wrote:
> This patch adds checking code whether filesystem supports norecovery mount
> option or not.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  common/rc | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index d413721..72e2f99 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2331,6 +2331,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
> +}

What's the point of making tests that use an XFS specific mount
option generic? If it requires this it is still an XFS specific
test, right?

Cheers,

Dave.
diff mbox

Patch

diff --git a/common/rc b/common/rc
index d413721..72e2f99 100644
--- a/common/rc
+++ b/common/rc
@@ -2331,6 +2331,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 bmap work on this fs?
 _require_bmap()
 {