Blame 0015-fs-lib-fs-lib.sh-skip-fsck-for-xfs-and-btrfs.-remoun.patch

Harald Hoyer c4a5a0
From 1594d0bf9cf19b45fdb5574e141e0cae163546f5 Mon Sep 17 00:00:00 2001
Harald Hoyer c4a5a0
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer c4a5a0
Date: Sat, 30 Jun 2012 12:15:04 +0200
Harald Hoyer c4a5a0
Subject: [PATCH] fs-lib/fs-lib.sh: skip fsck for xfs and btrfs. remount is
Harald Hoyer c4a5a0
 enough
Harald Hoyer c4a5a0
Harald Hoyer c4a5a0
---
Harald Hoyer c4a5a0
 modules.d/99fs-lib/fs-lib.sh |   28 +++++++++++++++-------------
Harald Hoyer c4a5a0
 1 file changed, 15 insertions(+), 13 deletions(-)
Harald Hoyer c4a5a0
Harald Hoyer c4a5a0
diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
Harald Hoyer c4a5a0
index d1b7a9d..b274935 100755
Harald Hoyer c4a5a0
--- a/modules.d/99fs-lib/fs-lib.sh
Harald Hoyer c4a5a0
+++ b/modules.d/99fs-lib/fs-lib.sh
Harald Hoyer c4a5a0
@@ -32,15 +32,17 @@ fsck_tail() {
Harald Hoyer c4a5a0
 # note: this function sets _drv of the caller
Harald Hoyer c4a5a0
 fsck_able() {
Harald Hoyer c4a5a0
     case "$1" in
Harald Hoyer c4a5a0
-        xfs) {
Harald Hoyer c4a5a0
-                type xfs_db &&
Harald Hoyer c4a5a0
-                type xfs_repair &&
Harald Hoyer c4a5a0
-                type xfs_check &&
Harald Hoyer c4a5a0
-                type mount &&
Harald Hoyer c4a5a0
-                type umount
Harald Hoyer c4a5a0
-            } >/dev/null 2>&1 &&
Harald Hoyer c4a5a0
-            _drv="_drv=none fsck_drv_xfs" &&
Harald Hoyer c4a5a0
-            return 0
Harald Hoyer c4a5a0
+        xfs)
Harald Hoyer c4a5a0
+            # {
Harald Hoyer c4a5a0
+            #     type xfs_db &&
Harald Hoyer c4a5a0
+            #     type xfs_repair &&
Harald Hoyer c4a5a0
+            #     type xfs_check &&
Harald Hoyer c4a5a0
+            #     type mount &&
Harald Hoyer c4a5a0
+            #     type umount
Harald Hoyer c4a5a0
+            # } >/dev/null 2>&1 &&
Harald Hoyer c4a5a0
+            # _drv="_drv=none fsck_drv_xfs" &&
Harald Hoyer c4a5a0
+            # return 0
Harald Hoyer c4a5a0
+            return 1
Harald Hoyer c4a5a0
             ;;
Harald Hoyer c4a5a0
         ext?)
Harald Hoyer c4a5a0
             type e2fsck >/dev/null 2>&1 &&
Harald Hoyer c4a5a0
@@ -58,9 +60,10 @@ fsck_able() {
Harald Hoyer c4a5a0
             return 0
Harald Hoyer c4a5a0
             ;;
Harald Hoyer c4a5a0
         btrfs)
Harald Hoyer c4a5a0
-            type btrfsck >/dev/null 2>&1 &&
Harald Hoyer c4a5a0
-            _drv="_drv=none fsck_drv_btrfs" &&
Harald Hoyer c4a5a0
-            return 0
Harald Hoyer c4a5a0
+            # type btrfsck >/dev/null 2>&1 &&
Harald Hoyer c4a5a0
+            # _drv="_drv=none fsck_drv_btrfs" &&
Harald Hoyer c4a5a0
+            # return 0
Harald Hoyer c4a5a0
+            return 1
Harald Hoyer c4a5a0
             ;;
Harald Hoyer c4a5a0
         nfs*)
Harald Hoyer c4a5a0
             # nfs can be a nop, returning success
Harald Hoyer c4a5a0
@@ -89,7 +92,6 @@ fsck_drv_btrfs() {
Harald Hoyer c4a5a0
     return 0
Harald Hoyer c4a5a0
 }
Harald Hoyer c4a5a0
 
Harald Hoyer c4a5a0
-
Harald Hoyer c4a5a0
 # common code for checkers that follow usual subset of options and return codes
Harald Hoyer c4a5a0
 fsck_drv_com() {
Harald Hoyer c4a5a0
     local _ret