From patchwork Thu Mar 14 14:08:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 2271451 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by patchwork2.kernel.org (Postfix) with ESMTP id EC93EDFB79 for ; Thu, 14 Mar 2013 14:12:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r2EE9tUf013760; Thu, 14 Mar 2013 10:09:56 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r2EE97bH021438 for ; Thu, 14 Mar 2013 10:09:07 -0400 Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.17]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2EE97SL008043 for ; Thu, 14 Mar 2013 10:09:07 -0400 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2EE8xbM015415 for ; Thu, 14 Mar 2013 10:08:59 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E7A64A522C; Thu, 14 Mar 2013 15:08:49 +0100 (CET) From: Hannes Reinecke To: dm-devel@redhat.com Date: Thu, 14 Mar 2013 15:08:43 +0100 Message-Id: <1363270128-20900-2-git-send-email-hare@suse.de> In-Reply-To: <1363270128-20900-1-git-send-email-hare@suse.de> References: <1363270128-20900-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -9.302 (BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, URIBL_BLOCKED) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.17 X-loop: dm-devel@redhat.com Cc: Christophe Varoqui Subject: [dm-devel] [PATCH 1/6] libmultipath: return PATH_DOWN for quiesced paths X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com When a SCSI device is quiesced we cannot send any I/O requests to it, so we should be returning 'PATH_DOWN' here. Signed-off-by: Hannes Reinecke --- libmultipath/discovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 0b5fd1d..050264e 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -798,7 +798,8 @@ path_offline (struct path * pp) condlog(3, "%s: path state = %s", pp->dev, buff); if (!strncmp(buff, "offline", 7) || - !strncmp(buff, "transport-offline", 17)) { + !strncmp(buff, "transport-offline", 17) || + !strncmp(buff, "quiesce", 7)) { pp->offline = 1; return PATH_DOWN; }