summaryrefslogtreecommitdiff
path: root/multipathd
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2010-03-23 17:04:00 -0500
committerChristophe Varoqui <christophe.varoqui@opensvc.com>2010-03-25 20:18:04 +0100
commit6ec48625e68f66e993178348a4a1e7916ac1222d (patch)
treef0adcb366e4d32f15b3fa688e81521290ed4ac3f /multipathd
parentca2e0bced9985b3d2a43c942a367dd9f2540cf00 (diff)
downloadmultipath-tools-6ec48625e68f66e993178348a4a1e7916ac1222d.tar.gz
multipath-tools-6ec48625e68f66e993178348a4a1e7916ac1222d.tar.bz2
multipath-tools-6ec48625e68f66e993178348a4a1e7916ac1222d.zip
multipath: add queue_without_daemon config parameter
This patch adds a new multipath.conf default paramter, queue_without_daemon. If this is set to "no", when multipathd stops, queueing will be turned off for all devices. This is useful for devices that set no_path_retry. If a machine is shut down while all paths to a device are down, it is possible to hang waiting for IO to return from the device after multipathd has been stopped. Without multipathd running, access to the paths cannot be restored, and the kernel cannot be told to stop queueing IO. Setting queue_without_daemon to "no" makes multipathd turn off queueing on all devices when it stops, avoiding the problem. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Diffstat (limited to 'multipathd')
-rw-r--r--multipathd/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/multipathd/main.c b/multipathd/main.c
index 3f7eb49..8754144 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1359,6 +1359,8 @@ child (void * param)
pthread_t check_thr, uevent_thr, uxlsnr_thr;
pthread_attr_t log_attr, misc_attr;
struct vectors * vecs;
+ struct multipath * mpp;
+ int i;
mlockall(MCL_CURRENT | MCL_FUTURE);
@@ -1448,6 +1450,9 @@ child (void * param)
*/
block_signal(SIGHUP, NULL);
lock(vecs->lock);
+ if (conf->queue_without_daemon == QUE_NO_DAEMON_OFF)
+ vector_foreach_slot(vecs->mpvec, mpp, i)
+ dm_queue_if_no_path(mpp->alias, 0);
remove_maps_and_stop_waiters(vecs);
free_pathvec(vecs->pathvec, FREE_PATHS);