Blame SOURCES/0282-lvm-add-cache-tools-for-dm-cache-usage.patch

712866
From 77ffc465b9c5615040b427dfdf35a3487ef9943c Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Wed, 28 Jan 2015 13:25:09 +0000
712866
Subject: [PATCH] lvm: add cache tools for dm-cache usage
712866
712866
(cherry picked from commit 70598ac292bce6e554cf0dc327426a7dbf92c65f)
712866
---
712866
 modules.d/90lvm/module-setup.sh | 19 +++++++++++++------
712866
 1 file changed, 13 insertions(+), 6 deletions(-)
712866
712866
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
5c6c2a
index 5ec62812..90bc39f7 100755
712866
--- a/modules.d/90lvm/module-setup.sh
712866
+++ b/modules.d/90lvm/module-setup.sh
712866
@@ -107,12 +107,19 @@ install() {
712866
             dev=$(
712866
             eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null)
712866
             [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue
712866
-            if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then
712866
-                inst_multiple -o thin_dump thin_restore thin_check thin_repair
712866
-                break
712866
-            fi
712866
+            case "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" in
712866
+                *thin*|*cache*|*era*)
712866
+                    inst_multiple -o thin_dump thin_restore thin_check thin_repair \
712866
+                                  cache_dump cache_restore cache_check cache_repair \
712866
+                                  era_check era_dump era_invalidate era_restore
712866
+                    break;;
712866
+            esac
712866
         done
712866
-    else
712866
-        inst_multiple -o thin_dump thin_restore thin_check thin_repair
712866
+    fi
712866
+
712866
+    if ! [[ $hostonly ]]; then
712866
+        inst_multiple -o thin_dump thin_restore thin_check thin_repair \
712866
+                      cache_dump cache_restore cache_check cache_repair \
712866
+                      era_check era_dump era_invalidate era_restore
712866
     fi
712866
 }