From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools/libmultipath discovery.c switc ...
Date: 30 Nov 2010 17:21:21 -0000 [thread overview]
Message-ID: <20101130172121.26737.qmail@sourceware.org> (raw)
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2010-11-30 17:21:20
Modified files:
libmultipath : discovery.c switchgroup.c
Log message:
updated fix for bzs #484419 and #570513.
simplified cciss handling to mirror what upstream does. Simply assume that
devices named like a cciss device are a cciss device.
Also, don't divide the priority by the number of enabled paths if that number
is 0. Not applicable upstream.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.32.2.16&r2=1.32.2.17
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/switchgroup.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.3&r2=1.5.2.4
--- multipath-tools/libmultipath/discovery.c 2010/09/03 03:46:12 1.32.2.16
+++ multipath-tools/libmultipath/discovery.c 2010/11/30 17:21:19 1.32.2.17
@@ -477,24 +477,6 @@
}
static int
-sysfs_get_driver (char *sysfs_path, char * dev, char *driver)
-{
- char path[FILE_NAME_SIZE];
- char buff[SYSFS_NAME_LEN];
-
- if (safe_sprintf(path, "%s/block/%s/device/driver", sysfs_path, dev)) {
- condlog(0, "driver path too small");
- return 1;
- }
- if (sysfs_get_link(path, buff, SYSFS_NAME_LEN) < 0) {
- condlog(0, "can't get driver link: %s", strerror(errno));
- return 1;
- }
- basename(buff, driver);
- return 0;
-}
-
-static int
sysfs_get_bus (char * sysfs_path, struct path * pp)
{
struct sysfs_device *sdev;
@@ -536,9 +518,8 @@
while (loop--) {
sdev = sysfs_open_device_path(attr_buff);
- if(!strncmp(pp->dev,"cciss",5))
- sysfs_get_driver(sysfs_path, pp->dev,
- sdev->bus);
+ if(!strncmp(pp->dev,"cciss",5))
+ strcpy(sdev->bus, "cciss");
if (strlen(sdev->bus))
break;
@@ -549,8 +530,7 @@
#else
sdev = sysfs_open_device_path(attr_buff);
if(!strncmp(pp->dev,"cciss",5))
- sysfs_get_driver(sysfs_path, pp->dev,
- sdev->bus);
+ strcpy(sdev->bus, "cciss");
#endif
if (!strncmp(sdev->bus, "scsi", 4))
--- multipath-tools/libmultipath/switchgroup.c 2010/09/03 20:59:14 1.5.2.3
+++ multipath-tools/libmultipath/switchgroup.c 2010/11/30 17:21:19 1.5.2.4
@@ -36,7 +36,7 @@
enabled_paths++;
}
}
- if (conf->pg_prio_calc == PG_PRIO_CALC_AVG)
+ if (conf->pg_prio_calc == PG_PRIO_CALC_AVG && enabled_paths)
pgp->priority = priority / enabled_paths;
else
pgp->priority = priority;
reply other threads:[~2010-11-30 17:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20101130172121.26737.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).