From patchwork Mon Aug 29 16:24:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: babu moger X-Patchwork-Id: 1108742 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7TGRcW1009627 for ; Mon, 29 Aug 2011 16:27:58 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7TGPAtJ030960; Mon, 29 Aug 2011 12:25:11 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7TGP9kj003647 for ; Mon, 29 Aug 2011 12:25:09 -0400 Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.17]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7TGP4DU019766 for ; Mon, 29 Aug 2011 12:25:04 -0400 Received: from mx2.netapp.com (mx2.netapp.com [216.240.18.37]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7TGP0o5031646 for ; Mon, 29 Aug 2011 12:25:00 -0400 X-IronPort-AV: E=Sophos;i="4.68,297,1312182000"; d="scan'208";a="575949220" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx2-out.netapp.com with ESMTP; 29 Aug 2011 09:24:43 -0700 Received: from sacrsexc1-prd.hq.netapp.com (sacrsexc1-prd.hq.netapp.com [10.99.115.27]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p7TGOgXI016824; Mon, 29 Aug 2011 09:24:43 -0700 (PDT) Received: from rtprsexc1-prd.hq.netapp.com ([10.100.161.114]) by sacrsexc1-prd.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Aug 2011 09:24:43 -0700 Received: from RTPMVEXC1-PRD.hq.netapp.com ([10.100.161.112]) by rtprsexc1-prd.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Aug 2011 12:24:39 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Mon, 29 Aug 2011 12:24:37 -0400 Message-ID: <47D23AD8469A2B448F33C24BD7A39BD90F58AC11@RTPMVEXC1-PRD.hq.netapp.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RESEND][PATCH] multipath-tools: service mode changes for RDAC storage Thread-Index: AcxmaCVGDhp4Ss5FSey+mWhoAR7UXw== From: "Moger, Babu" To: "device-mapper development" , X-OriginalArrivalTime: 29 Aug 2011 16:24:39.0210 (UTC) FILETIME=[264CC8A0:01CC6668] X-RedHat-Spam-Score: -5.504 (RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.17 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id p7TGP9kj003647 X-loop: dm-devel@redhat.com Cc: "Chauhan, Vijay" , "Stankey, Robert" , "Krishnasamy, Somasundaram" , "Dachepalli, Sudhir" Subject: [dm-devel] [RESEND][PATCH] multipath-tools: service mode changes for RDAC storage 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: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 29 Aug 2011 16:27:58 +0000 (UTC) This patch was not picked up yet, so resubmitting it again. There no change except it was generated on top of the latest file. This patch handles the recent changes in NetApp RDAC storage firmware to report service mode. Firmware changed the inquiry page 0xc9 to report service mode. Purpose this change is to avoid DMMP going into infinite loop of switching back and forth between controllers when a controller is placed in service mode. This fixes the problem and reports the path as failed if the controller is placed in service mode. Signed-off-by: Babu Moger Reviewed-by: Yanling Qi Reviewed-by: Somasundaram Krishnasamy --- -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel --- multipath-tools/libmultipath/checkers/rdac.c.orig 2011-08-29 10:36:11.000000000 -0500 +++ multipath-tools/libmultipath/checkers/rdac.c 2011-08-29 10:58:44.000000000 -0500 @@ -198,7 +198,10 @@ struct volume_access_inq char PQ_PDT; char dontcare0[7]; char avtcvp; - char dontcare1[39]; + char dontcare1; + char asym_access_state_cur; + char vendor_specific_cur; + char dontcare2[36]; }; extern int @@ -218,6 +221,14 @@ libcheck_check (struct checker * c) goto done; } + /* check if controller is in service mode */ + if ((inq.avtcvp & 0x10) && + ((inq.asym_access_state_cur & 0x0F) == 0x3) && + (inq.vendor_specific_cur == 0x7)) { + ret = PATH_DOWN; + goto done; + } + /* If owner set or ioship mode is enabled return PATH_UP always */ if ((inq.avtcvp & 0x1) || ((inq.avtcvp >> 5) & 0x1)) ret = PATH_UP;