From patchwork Fri Apr 8 19:06:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: babu moger X-Patchwork-Id: 695421 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p38J7w4e005248 for ; Fri, 8 Apr 2011 19:08:19 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 p38J5lo6002604; Fri, 8 Apr 2011 15:05:49 -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 p38J564I003833 for ; Fri, 8 Apr 2011 15:05:06 -0400 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p38J51C2023421 for ; Fri, 8 Apr 2011 15:05:01 -0400 Received: from na3sys009aog108.obsmtp.com (na3sys009aog108.obsmtp.com [74.125.149.199]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p38J50SU008202 for ; Fri, 8 Apr 2011 15:05:00 -0400 Received: from cosedge01.lsi.com ([192.19.220.66]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKTZ9cXIpx0LhQKOXDSbRKuw8gWbhiG78R@postini.com; Fri, 08 Apr 2011 12:05:00 PDT Received: from coscas01.lsi.com (172.21.36.60) by COSEDGE01.lsi.com (192.19.220.66) with Microsoft SMTP Server (TLS) id 8.3.137.0; Fri, 8 Apr 2011 13:04:06 -0600 Received: from cosmail01.lsi.com ([172.21.36.24]) by coscas01.lsi.com ([172.21.36.60]) with mapi; Fri, 8 Apr 2011 13:06:20 -0600 From: "Moger, Babu" To: device-mapper development Date: Fri, 8 Apr 2011 13:06:15 -0600 Thread-Topic: [PATCH 2/2] multipath-tools: report different piority value for rdac if io-shipping is enabled Thread-Index: Acv2IAilo8Y8m9xSTkeivjknaN5xqw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-RedHat-Spam-Score: -2.3 (RCVD_IN_DNSWL_MED) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id p38J564I003833 X-loop: dm-devel@redhat.com Cc: "Krishnasamy, Somasundaram" , "Stankey, Robert" Subject: [dm-devel] [PATCH 2/2] multipath-tools: report different piority value for rdac if io-shipping is enabled 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 (demeter1.kernel.org [140.211.167.41]); Fri, 08 Apr 2011 19:08:19 +0000 (UTC) This patch adds code to report different priority value if the storage is configured with io-shipping. It sets the bit 3 if io-shipping is enabled. This is to differentiate between different modes. 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/prioritizers/rdac.c.orig 2011-04-01 17:06:25.000000000 -0500 +++ multipath-tools/libmultipath/prioritizers/rdac.c 2011-04-01 17:30:27.000000000 -0500 @@ -81,6 +81,10 @@ int rdac_prio(const char *dev, int fd) break; } + /* For ioship mode set the bit 3 (00001000) */ + if ((sense_buffer[8] >> 5) & 0x01) + ret |= 0x08; + out: return(ret); }