From patchwork Fri Nov 20 07:15:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiyoshi Ueda X-Patchwork-Id: 61595 X-Patchwork-Delegate: agk@redhat.com Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAK7GZTV009239 for ; Fri, 20 Nov 2009 07:16:35 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 05E1E61A22D; Fri, 20 Nov 2009 02:16:35 -0500 (EST) Received: from int-mx04.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id nAK7GYsI019048 for ; Fri, 20 Nov 2009 02:16:34 -0500 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.13]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAK7GXk7016757; Fri, 20 Nov 2009 02:16:34 -0500 Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [202.32.8.206]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAK7GHKt015196; Fri, 20 Nov 2009 02:16:18 -0500 Received: from mailgate3.nec.co.jp ([10.7.69.160]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id nAK7G57F000533; Fri, 20 Nov 2009 16:16:05 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id nAK7G5i07757; Fri, 20 Nov 2009 16:16:05 +0900 (JST) Received: from mail02.kamome.nec.co.jp (mail02.kamome.nec.co.jp [10.25.43.5]) by mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id nAK7G5Hr013285; Fri, 20 Nov 2009 16:16:05 +0900 (JST) Received: from monta.jp.nec.com ([10.26.220.14] [10.26.220.14]) by mail02.kamome.nec.co.jp with ESMTP id BT-MMP-351275; Fri, 20 Nov 2009 16:15:26 +0900 Received: from elcondor.linux.bs1.fc.nec.co.jp ([10.34.125.195] [10.34.125.195]) by mail.jp.nec.com with ESMTP; Fri, 20 Nov 2009 16:15:25 +0900 Message-ID: <4B06420D.3070702@ct.jp.nec.com> Date: Fri, 20 Nov 2009 16:15:25 +0900 From: Kiyoshi Ueda User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Alasdair Kergon , Mike Anderson References: <4B06408A.1080700@ct.jp.nec.com> In-Reply-To: <4B06408A.1080700@ct.jp.nec.com> X-RedHat-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.13 X-loop: dm-devel@redhat.com Cc: device-mapper development Subject: [dm-devel] [PATCH 4/4] dm-mpath: reject message when the device is suspended X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com 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);