[lvm-devel] master - blkdeactivate: fix regression in blkdeactivate causing dm and md devices to be skipped.

Peter Rajnoha prajnoha at fedoraproject.org
Mon Jun 6 13:03:17 UTC 2016


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7ae05adf462b8de4428f32600fb43583dce5009a
Commit:        7ae05adf462b8de4428f32600fb43583dce5009a
Parent:        7c894911aee47662e8f85f4458d65baea97eb058
Author:        Peter Rajnoha <prajnoha at redhat.com>
AuthorDate:    Mon Jun 6 14:57:41 2016 +0200
Committer:     Peter Rajnoha <prajnoha at redhat.com>
CommitterDate: Mon Jun 6 14:57:46 2016 +0200

blkdeactivate: fix regression in blkdeactivate causing dm and md devices to be skipped.

Commit #5b3a4a9 caused the "name" variable to be cleared if
declaration and assignment is on two lines so put it back
so it's on one line for it to work again.
---
 WHATS_NEW                   |    1 +
 scripts/blkdeactivate.sh.in |    6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index c1b90af..2e7e138 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.156 - 
 ================================
+  Fix regression in blkdeactivate causing dm and md devices to be skipped. (2.02.155)
 
 Version 2.02.155 - 3rd June 2016
 ================================
diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in
index 2a48b3e..b4c3237 100644
--- a/scripts/blkdeactivate.sh.in
+++ b/scripts/blkdeactivate.sh.in
@@ -193,8 +193,7 @@ deactivate_holders () {
 }
 
 deactivate_dm () {
-	local name
-	name=$(printf "%s" "$name")
+	local name=$(printf "%s" "$name")
 	test -b "$DEV_DIR/mapper/$name" || return 0
 	test -z ${SKIP_DEVICE_LIST["$kname"]} || return 1
 
@@ -263,8 +262,7 @@ deactivate_lvm () {
 }
 
 deactivate_md () {
-	local name
-	name=$(printf "%s" "$name")
+	local name=$(printf "%s" "$name")
 	test -b "$DEV_DIR/$name" || return 0
 	test -z ${SKIP_DEVICE_LIST["$kname"]} || return 1
 




More information about the lvm-devel mailing list