1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

blkdeactivate: fix blkdeactivate regression with failing DM/MD devs deactivation

Revert dc50f2f4a0.

We're canonicalizing/escaping the names here and we're reusing the
variable name so the code doesn't need to use extra variables and
further assignments that may confuse us. Let's keep the code simple.

The

   local name=(...$name)

is not the same as

   local name
   name=(...$name)

(I know various code-checking tools fuss about this and recommend
the 2nd way, but let's ignore those tools' nitpicking here please.)
This commit is contained in:
Peter Rajnoha 2017-09-21 13:39:52 +02:00
parent 9f34125d5d
commit 7fa0d52262
2 changed files with 3 additions and 6 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.144 - Version 1.02.144 -
====================================== ======================================
Fix blkdeactivate regression with failing DM/MD devs deactivation (1.02.142).
Fix typo in blkdeactivate's '--{dm,lvm,mpath}options' option name. Fix typo in blkdeactivate's '--{dm,lvm,mpath}options' option name.
Correct return value testing when get reserved values for reporting. Correct return value testing when get reserved values for reporting.
Take -S with dmsetup suspend/resume/clear/wipe_table/remove/deps/status/table. Take -S with dmsetup suspend/resume/clear/wipe_table/remove/deps/status/table.

View File

@ -205,9 +205,7 @@ deactivate_holders () {
} }
deactivate_dm () { deactivate_dm () {
local name local name=$(printf "%s" "$name")
name=$(printf "%s" "$name")
test -b "$DEV_DIR/mapper/$name" || return 0 test -b "$DEV_DIR/mapper/$name" || return 0
test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1 test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1
@ -276,9 +274,7 @@ deactivate_lvm () {
} }
deactivate_md () { deactivate_md () {
local name local name=$(printf "%s" "$name")
name=$(printf "%s" "$name")
test -b "$DEV_DIR/$name" || return 0 test -b "$DEV_DIR/$name" || return 0
test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1 test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1