From patchwork Tue Jan 13 22:26:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bmarzins@sourceware.org X-Patchwork-Id: 2229 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 n0DMN4XU016981 for ; Tue, 13 Jan 2009 14:23:05 -0800 Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 48129618257; Tue, 13 Jan 2009 17:27:07 -0500 (EST) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n0DMR542011300 for ; Tue, 13 Jan 2009 17:27:05 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n0DMR4o2026478 for ; Tue, 13 Jan 2009 17:27:04 -0500 Received: from sourceware.org (sourceware.org [209.132.176.174]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id n0DMQges005349 for ; Tue, 13 Jan 2009 17:26:42 -0500 Received: (qmail 14122 invoked by uid 9475); 13 Jan 2009 22:26:38 -0000 Date: 13 Jan 2009 22:26:38 -0000 Message-ID: <20090113222638.14120.qmail@sourceware.org> From: bmarzins@sourceware.org To: dm-cvs@sourceware.org, dm-devel@redhat.com X-RedHat-Spam-Score: -4 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.31 X-loop: dm-devel@redhat.com Cc: Subject: [dm-devel] multipath-tools ./multipath.conf.defaults libm ... 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 CVSROOT: /cvs/dm Module name: multipath-tools Branch: RHEL4_FC5 Changes by: bmarzins@sourceware.org 2009-01-13 22:26:37 Modified files: . : multipath.conf.defaults libmultipath : hwtable.c path_priority/pp_netapp: Makefile pp_netapp.c Log message: Fix for bz #478643 This is just a backport of 282131. It fixes some prio callout issues, and switches the name Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath.conf.defaults.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.5.2.9&r2=1.5.2.10 http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/hwtable.c.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.16.2.13&r2=1.16.2.14 http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/path_priority/pp_netapp/Makefile.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.1.2.1&r2=1.1.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/path_priority/pp_netapp/pp_netapp.c.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.1&r2=1.1.2.1 --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel --- multipath-tools/multipath.conf.defaults 2007/12/03 18:42:15 1.5.2.9 +++ multipath-tools/multipath.conf.defaults 2009/01/13 22:26:36 1.5.2.10 @@ -197,7 +197,7 @@ # product "LUN" # path_grouping_policy group_by_prio # getuid_callout "/sbin/scsi_id -g -u -s" -# prio_callout "/sbin/mpath_prio_netapp /dev/%n" +# prio_callout "/sbin/mpath_prio_ontap /dev/%n" # features "1 queue_if_no_path" # path_checker readsector0 # } @@ -206,7 +206,7 @@ # product "Nseries" # path_grouping_policy group_by_prio # getuid_callout "/sbin/scsi_id -g -u -s" -# prio_callout "/sbin/mpath_prio_netapp /dev/%n" +# prio_callout "/sbin/mpath_prio_ontap /dev/%n" # features "1 queue_if_no_path" # path_checker readsector0 # failback immediate --- multipath-tools/libmultipath/hwtable.c 2007/12/03 18:42:15 1.16.2.13 +++ multipath-tools/libmultipath/hwtable.c 2009/01/13 22:26:37 1.16.2.14 @@ -70,10 +70,10 @@ "/sbin/dasdview -j -f /dev/%n", NULL, "0", "0", "directio", FAILBACK_UNDEF, "S/390", 0, 0, 0); r += store_hwe_ext(hw, "NETAPP", "LUN", GROUP_BY_PRIO, DEFAULT_GETUID, - "/sbin/mpath_prio_netapp /dev/%n", NULL, + "/sbin/mpath_prio_ontap /dev/%n", NULL, "1 queue_if_no_path", "readsector0", FAILBACK_UNDEF, NULL, 0, 0, 0); r += store_hwe_ext(hw, "IBM", "Nseries", GROUP_BY_PRIO, DEFAULT_GETUID, - "/sbin/mpath_prio_netapp /dev/%n", NULL, + "/sbin/mpath_prio_ontap /dev/%n", NULL, "1 queue_if_no_path", "readsector0", -FAILBACK_IMMEDIATE, NULL, 0, 0, 128); r += store_hwe_ext(hw, "Pillar", "Axiom 500", GROUP_BY_PRIO, --- multipath-tools/path_priority/pp_netapp/Makefile 2008/05/06 19:49:39 1.1.2.1 +++ multipath-tools/path_priority/pp_netapp/Makefile 2009/01/13 22:26:37 1.1.2.2 @@ -1,4 +1,5 @@ -EXEC = mpath_prio_netapp +EXEC = mpath_prio_ontap +LINK = mpath_prio_netapp BUILD = glibc OBJS = pp_netapp.o @@ -17,9 +18,11 @@ install: $(EXEC) install -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) + ln -sf $(DESTDIR)$(bindir)/$(EXEC) $(DESTDIR)$(bindir)/$(LINK) uninstall: rm $(DESTDIR)$(bindir)/$(EXEC) + rm $(DESTDIR)$(bindir)/$(LINK) clean: rm -f *.o $(EXEC) --- multipath-tools/path_priority/pp_netapp/pp_netapp.c 2005/11/21 23:28:32 1.1 +++ multipath-tools/path_priority/pp_netapp/pp_netapp.c 2009/01/13 22:26:37 1.1.2.1 @@ -29,7 +29,7 @@ #define INQUIRY_CMDLEN 6 #define DEFAULT_PRIO 10 #define RESULTS_MAX 256 -#define SG_TIMEOUT 30000 +#define SG_TIMEOUT 60000 static void dump_cdb(unsigned char *cdb, int size) @@ -209,7 +209,7 @@ memset(&results, 0, sizeof (results)); rc = send_gva(dev, 0x41, results, &results_size); - if (rc == 0) { + if (rc >= 0) { tot_len = results[0] << 24 | results[1] << 16 | results[2] << 8 | results[3]; if (tot_len <= 8) { @@ -229,12 +229,16 @@ is_iscsi_hardware = 1; goto prio_select; } + } else { + return 0; } try_fcp_proxy: rc = get_proxy(dev); if (rc >= 0) { is_proxy = rc; + } else { + return 0; } prio_select: