From patchwork Mon Jul 25 12:04:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: babu moger X-Patchwork-Id: 1004182 Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6PC7Zir030568 for ; Mon, 25 Jul 2011 12:07:56 GMT 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 p6PC5IZg031678; Mon, 25 Jul 2011 08:05:20 -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 p6PC5GUb014837 for ; Mon, 25 Jul 2011 08:05:16 -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 p6PC5BQ0013836 for ; Mon, 25 Jul 2011 08:05:11 -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 p6PC5AVg004976 for ; Mon, 25 Jul 2011 08:05:11 -0400 X-IronPort-AV: E=Sophos;i="4.67,260,1309762800"; d="scan'208";a="565258955" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 25 Jul 2011 05:04:55 -0700 Received: from sacrsexc2-prd.hq.netapp.com (sacrsexc2-prd.hq.netapp.com [10.99.115.28]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p6PC4s8d028895 for ; Mon, 25 Jul 2011 05:04:55 -0700 (PDT) Received: from rtprsexc1-prd.hq.netapp.com ([10.100.161.114]) by sacrsexc2-prd.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 25 Jul 2011 05:04:55 -0700 Received: from RTPMVEXC1-PRD.hq.netapp.com ([10.100.161.111]) by rtprsexc1-prd.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 25 Jul 2011 08:04:53 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Mon, 25 Jul 2011 08:04:50 -0400 Message-ID: <47D23AD8469A2B448F33C24BD7A39BD90EC1660B@RTPMVEXC1-PRD.hq.netapp.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] multipath-tools: service mode changes for RDAC storage Thread-Index: AcxKww4NWQfnOsAdRxqbur8SDFUdeA== From: "Moger, Babu" To: "device-mapper development" X-OriginalArrivalTime: 25 Jul 2011 12:04:53.0158 (UTC) FILETIME=[0FD4BC60:01CC4AC3] X-RedHat-Spam-Score: -6.191 (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 p6PC5GUb014837 X-loop: dm-devel@redhat.com Cc: "Kumar, Vijay" , "Dachepalli, Sudhir" , "Krishnasamy, Somasundaram" , "Qi, Yanling" , "Stankey, Robert" Subject: [dm-devel] [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, 25 Jul 2011 12:07:56 +0000 (UTC) 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-0.4.8/libmultipath/checkers/rdac.c.orig 2011-07-06 16:37:43.000000000 -0500 +++ multipath-tools-0.4.8/libmultipath/checkers/rdac.c 2011-07-25 06:38:03.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 @@ -216,6 +219,14 @@ libcheck_check (struct checker * c) ret = PATH_DOWN; 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))