From patchwork Tue Oct 20 13:09:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chauhan, Vijay" X-Patchwork-Id: 54943 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 n9KD9cwg011488 for ; Tue, 20 Oct 2009 13:09:38 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 1F26D619057; Tue, 20 Oct 2009 09:09:38 -0400 (EDT) Received: from int-mx08.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 n9KD9aaU032600 for ; Tue, 20 Oct 2009 09:09:36 -0400 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9KD9a1A006427 for ; Tue, 20 Oct 2009 09:09:36 -0400 Received: from na3sys009aog109.obsmtp.com (na3sys009aog109.obsmtp.com [74.125.149.201]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9KD9Lna014545 for ; Tue, 20 Oct 2009 09:09:21 -0400 Received: from source ([147.145.40.20]) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKSt22gAkJaf+JoM56zu7nAzUVGKJzB8BW@postini.com; Tue, 20 Oct 2009 06:09:24 PDT Received: from milmhbs0.lsil.com (mhbs.lsil.com [147.145.1.30]) by mail0.lsil.com (8.12.11/8.12.11) with ESMTP id n9KD9JCv006294; Tue, 20 Oct 2009 06:09:19 -0700 (PDT) Received: from inbmail01.lsi.com (inbmail01.in.lsil.com [172.28.140.213]) by milmhbs0.lsil.com (8.12.11/8.12.11) with ESMTP id n9KD9I7X021673; Tue, 20 Oct 2009 06:09:19 -0700 Received: from inbmail01.lsi.com ([172.28.140.213]) by inbmail01.lsi.com ([172.28.140.213]) with mapi; Tue, 20 Oct 2009 18:39:16 +0530 From: "Chauhan, Vijay" To: device-mapper development , "christophe.varoqui@free.fr" Date: Tue, 20 Oct 2009 18:39:15 +0530 Thread-Topic: [Patch] multipath-tools: rdac path checked leads to I/O hang when volumes are unmapped from storage. Thread-Index: AcpRhoYrMjv9qUPGQ+uvvxyuCo8Wig== Message-ID: <0D1E8821739E724A86F4D16902CE275C1C93A0247B@inbmail01.lsi.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.11 X-Scanned-By: MIMEDefang 2.39 X-RedHat-Spam-Score: -2 (AWL) X-MIME-Autoconverted: from quoted-printable to 8bit by listman.util.phx.redhat.com id n9KD9aaU032600 X-loop: dm-devel@redhat.com Cc: "Dachepalli, Sudhir" , "sekharan@linux.vnet.ibm.com" , "Moger, Babu" Subject: [dm-devel] [Patch] multipath-tools: rdac path checked leads to I/O hang when volumes are unmapped from storage. 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 --- multipath-tools/libmultipath/checkers/rdac.c.orig 2009-10-20 23:01:50.000000000 +0530 +++ multipath-tools/libmultipath/checkers/rdac.c 2009-10-20 23:49:31.000000000 +0530 @@ -91,7 +91,8 @@ do_inq(int sg_fd, unsigned int pg_op, vo struct volume_access_inq { - char dontcare0[8]; + char PQ_PDT; + char dontcare0[7]; char avtcvp; char dontcare1[39]; }; @@ -105,6 +106,11 @@ libcheck_check (struct checker * c) if (0 != do_inq(c->fd, 0xC9, &inq, sizeof(struct volume_access_inq))) { MSG(c, MSG_RDAC_DOWN); return PATH_DOWN; + } else { + if ((inq.PQ_PDT & 0x20) || (inq.PQ_PDT & 0x7f)) { + /* LUN not connected*/ + return PATH_DOWN; + } } if (inq.avtcvp & 0x1) {