File multipath-tools-fails-to-flush-maps of Package multipath-tools
From a20a7700705040233140d74ec57ca4618f81bb91 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 13 Mar 2009 13:52:17 +0100
Subject: [PATCH] multipath -f fails to remove multipath maps
When 'queue_if_no_path' is set multipath can't flush mappings as
there is still I/O outstanding. So we have to explicitely switch
off queueing here to terminate all I/O before we're able to
remove the map.
References: bnc#475523
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/devmapper.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index d173cc8..572f6e1 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -558,6 +558,9 @@ dm_flush_map (const char * mapname, int flush_io)
if (dm_type(mapname, TGT_MPATH) <= 0)
return 1;
+ if (flush_io && dm_queue_if_no_path((char *)mapname, 0))
+ condlog(3, "%s: could not unset queue_if_no_path", mapname);
+
if (dm_remove_partmaps(mapname))
return 1;
@@ -566,9 +569,6 @@ dm_flush_map (const char * mapname, int flush_io)
return 1;
}
- if (flush_io && dm_queue_if_no_path((char *)mapname, 0))
- condlog(3, "%s: could not unset queue_if_no_path", mapname);
-
r = dm_simplecmd(DM_DEVICE_REMOVE, mapname, 0);
if (r) {
--
1.6.0.2