[dm-devel] [PATCH 4/4] dm-mpath: reject message when the device is suspended

Kiyoshi Ueda k-ueda at ct.jp.nec.com
Fri Nov 20 07:15:25 UTC 2009


This patch rejects messages that can generate I/O while the device itself
is suspended.

Signed-off-by: Kiyoshi Ueda <k-ueda at ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura at ce.jp.nec.com>
Cc: Mike Anderson <andmike at linux.vnet.ibm.com>
Cc: Alasdair G Kergon <agk at redhat.com>
---
 drivers/md/dm-mpath.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: 2.6.32-rc7/drivers/md/dm-mpath.c
===================================================================
--- 2.6.32-rc7.orig/drivers/md/dm-mpath.c
+++ 2.6.32-rc7/drivers/md/dm-mpath.c
@@ -1421,6 +1421,11 @@ static int multipath_message(struct dm_t
 
 	mutex_lock(&m->work_mutex);
 
+	if (dm_suspended(ti)) {
+		r = -EBUSY;
+		goto out;
+	}
+
 	if (argc == 1) {
 		if (!strnicmp(argv[0], MESG_STR("queue_if_no_path"))) {
 			r = queue_if_no_path(m, 1, 0);




More information about the dm-devel mailing list