FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 01-27-2010, 04:21 PM
 
Default multipath-tools libmultipath/discovery.c multi ...

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2010-01-27 17:21:49

Modified files:
libmultipath : discovery.c
multipathd : main.c

Log message:
More work for bz #553042. If the checker_timeout isn't set, check the sysfs scsi
timeout before each check.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC 6&r1=1.32.2.11&r2=1.32.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= 1.69.2.25&r2=1.69.2.26

--- multipath-tools/libmultipath/discovery.c 2010/01/27 16:46:48 1.32.2.11
+++ multipath-tools/libmultipath/discovery.c 2010/01/27 17:21:48 1.32.2.12
@@ -242,7 +242,7 @@
{
struct sysfs_attribute * attr;
char attr_path[SYSFS_PATH_SIZE];
- int r;
+ int t, r;

if (safe_sprintf(attr_path, "%s/block/%s/device/timeout", sysfs_path,
dev))
@@ -256,12 +256,13 @@
if (0 > sysfs_read_attribute(attr))
goto out;

- r = sscanf(attr->value, "%u
", timeout);
+ r = sscanf(attr->value, "%u
", &t);
sysfs_close_attribute(attr);

if (r != 1)
return 1;

+ *timeout = t;
return 0;
out:
sysfs_close_attribute(attr);
--- multipath-tools/multipathd/main.c 2009/11/02 19:11:46 1.69.2.25
+++ multipath-tools/multipathd/main.c 2010/01/27 17:21:48 1.69.2.26
@@ -979,8 +979,12 @@
*/
checker_set_async(&pp->checker);

- if (check_sysfs_state(pp, &newstate) == 0)
+ if (check_sysfs_state(pp, &newstate) == 0) {
+ if (!conf->checker_timeout)
+ sysfs_get_timeout(sysfs_path, pp->dev,
+ &(pp->checker.timeout));
newstate = checker_check(&pp->checker);
+ }

if (newstate < 0) {
condlog(2, "%s: unusable path", pp->dev);

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 06:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org