Skip to contentSkip to conversation

master - blkdeactivate: also unmount mount point on top of MD device if using blkdeactivate -u

PATCH Peter Rajnoha 1 participant 1 message Jan 6, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d90320f4f161658c6a004631c5685b40202af2cc
Commit:        d90320f4f161658c6a004631c5685b40202af2cc
Parent:        b92a9c3e1ab9972b059ef797136c7e04b4b9368f
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Fri Jan 6 11:16:07 2017 +0100
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Fri Jan 6 11:16:07 2017 +0100

blkdeactivate: also unmount mount point on top of MD device if using blkdeactivate -u

The blkdeactivate script processes MD devices too so we should unmount any mount point on top of an MD device if blkdeactivate -u|--umount is called.

Diagnosed and reported by: Rick Warner <[email protected]> See also https://bugzilla.redhat.com/show_bug.cgi?id=1410585.

---
 WHATS_NEW                   |    1 +
 scripts/blkdeactivate.sh.in |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index 3fde645..44b1df8 100644
@@ -1,5 +1,6 @@
 Version 2.02.169 - 
 =====================================
+  Also unmount mount point on top of MD device if using blkdeactivate -u.
   Restore check preventing resize of cache type volumes (2.02.158).
   Add missing udev sync when flushing dirty cache content.
   vgchange -p accepts only uint32 numbers.
scripts/blkdeactivate.sh.in +2 -1
index 443af9c..436c72e 100644
@@ -171,7 +171,8 @@ device_umount_one() {
 }
 
 device_umount() {
-	test "$devtype" != "lvm" && test "${kname:0:3}" != "dm-" && return 0
+	test "$devtype" != "lvm" && test "${kname:0:3}" != "dm-" \
+          && test "${kname:0:2}" != "md" && return 0
 
 	# FINDMNT is defined only if umount --all-targets is not available.
 	# In that case, read the list of multiple mount points of one device