From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools ./multipath.conf.defaults libm ...
Date: 24 Aug 2010 21:51:11 -0000 [thread overview]
Message-ID: <20100824215111.17381.qmail@sourceware.org> (raw)
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2010-08-24 21:51:10
Modified files:
. : multipath.conf.defaults
libmultipath : hwtable.c
path_priority/pp_hds_modular: pp_hds_modular.c
Log message:
Fix for bz #559852. mpath_prio_hds_modular can now accept a pathname as well
as the major:minor. The default config has been switched to use this. This
allows the callout to work even if they can't create any files on /tmp. Not
Applicable upstream.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath.conf.defaults.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.4.22&r2=1.5.4.23
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/hwtable.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.20.2.29&r2=1.20.2.30
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/path_priority/pp_hds_modular/pp_hds_modular.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.2&r2=1.2.2.1
--- multipath-tools/multipath.conf.defaults 2010/08/09 21:35:58 1.5.4.22
+++ multipath-tools/multipath.conf.defaults 2010/08/24 21:51:10 1.5.4.23
@@ -267,7 +267,7 @@
# vendor "HITACHI"
# product "DF.*"
# getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
-# prio_callout "/sbin/mpath_prio_hds_modular %d"
+# prio_callout "/sbin/mpath_prio_hds_modular /dev/%n"
# features "0"
# hardware_handler "0"
# path_grouping_policy group_by_prio
@@ -395,7 +395,7 @@
# vendor "IBM"
# product "1750500"
# getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
-# prio_callout "/sbin/mpath_prio_alua %d"
+# prio_callout "/sbin/mpath_prio_alua /dev/%n"
# features "1 queue_if_no_path"
# hardware_handler "0"
# path_grouping_policy group_by_prio
@@ -482,7 +482,7 @@
# vendor "Pillar"
# product "Axiom [35]00"
# getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
-# prio_callout "/sbin/mpath_prio_alua %d"
+# prio_callout "/sbin/mpath_prio_alua /dev/%n"
# features "0"
# hardware_handler "0"
# path_grouping_policy group_by_prio
--- multipath-tools/libmultipath/hwtable.c 2010/08/09 21:35:58 1.20.2.29
+++ multipath-tools/libmultipath/hwtable.c 2010/08/24 21:51:10 1.20.2.30
@@ -289,7 +289,7 @@
.vendor = "HITACHI",
.product = "DF.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_hds_modular %d",
+ .getprio = "/sbin/mpath_prio_hds_modular /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -646,7 +646,7 @@
.vendor = "Pillar",
.product = "Axiom [35]00",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_alua %d",
+ .getprio = "/sbin/mpath_prio_alua /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
--- multipath-tools/path_priority/pp_hds_modular/pp_hds_modular.c 2006/06/06 18:32:44 1.2
+++ multipath-tools/path_priority/pp_hds_modular/pp_hds_modular.c 2010/08/24 21:51:10 1.2.2.1
@@ -99,7 +99,7 @@
int verbose;
-int hds_modular_prio(char * major_minor)
+int hds_modular_prio(char * device)
{
int sg_fd, k, i;
char vendor[32];
@@ -117,16 +117,24 @@
unsigned char sense_buffer[32];
sg_io_hdr_t io_hdr;
- sscanf(major_minor, "%u:%u", &major, &minor);
memset(devpath, 0, FILE_NAME_SIZE);
+ if (sscanf(device, "%u:%u", &major, &minor) == 2) {
- if (safe_sprintf(devpath, "/tmp/.pp_balance.%u.%u.devnode",
- major, minor))
- exit(1);
-
- unlink (devpath);
- mknod(devpath, S_IFBLK|S_IRUSR|S_IWUSR, makedev(major, minor));
+ if (safe_sprintf(devpath, "/tmp/.pp_balance.%u.%u.devnode",
+ major, minor))
+ exit(1);
+ unlink (devpath);
+ mknod(devpath, S_IFBLK|S_IRUSR|S_IWUSR, makedev(major, minor));
+ }
+ else if (device[0] == '/') {
+ if (safe_sprintf(devpath, "%s", device))
+ exit(1);
+ }
+ else {
+ if (safe_sprintf(devpath, "/dev/%s", device))
+ exit(1);
+ }
if ((sg_fd = open(devpath, O_RDONLY)) < 0) exit(1);
if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000))
exit(1);
next reply other threads:[~2010-08-24 21:51 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 21:51 bmarzins [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 21:56 multipath-tools ./multipath.conf.defaults libm bmarzins
2011-01-21 16:57 bmarzins
2010-11-12 20:17 bmarzins
2010-09-21 18:06 bmarzins
2010-09-14 19:42 bmarzins
2010-09-03 3:46 bmarzins
2010-08-09 21:35 bmarzins
2010-08-09 18:38 bmarzins
2010-02-10 4:11 bmarzins
2010-01-26 5:50 bmarzins
2009-12-02 19:15 bmarzins
2009-09-28 18:41 bmarzins
2009-09-28 18:28 bmarzins
2009-09-11 15:19 bmarzins
2009-08-19 21:52 bmarzins
2009-01-15 22:47 bmarzins
2009-01-13 22:26 bmarzins
2008-08-29 18:30 bmarzins
2008-07-12 17:36 bmarzins
2008-07-12 2:44 bmarzins
2008-07-12 0:07 bmarzins
2008-01-03 20:16 bmarzins
2007-10-09 21:48 bmarzins
2007-09-11 18:06 bmarzins
2007-08-14 18:08 bmarzins
2007-08-14 18:23 ` S. J. van Harmelen
2007-05-07 17:59 bmarzins
2006-12-19 22:51 bmarzins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100824215111.17381.qmail@sourceware.org \
--to=bmarzins@sourceware.org \
--cc=dm-cvs@sourceware.org \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).