FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 03-20-2008, 08:28 AM
Hannes Reinecke
 
Default multipath: update discovery for sysfs layout changes

Hi Christophe,

this patch updates the discovery to work when SYSFS_DEPRECATED is
not set. The change here is that the parent of a block device is
'block', and the 'real' parent is the parent of that. Easy and
non-intrusive change.

Please apply.

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
commit e178e517afac5c66403baf564479da31b1219041
Author: Hannes Reinecke <hare@suse.de>
Date: Thu Mar 20 09:19:34 2008 +0100

Update discovery to work with new sysfs layout

With the new sysfs layout the parent device of a block device
it 'block', and only the parent of this is the 'real' parent.

Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index a85a248..30c36e5 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -550,6 +550,9 @@ sysfs_pathinfo(struct path * pp)
if (!parent)
parent = pp->sysdev;

+ if (!strncmp(parent->kernel, "block",5))
+ parent = sysfs_device_get_parent(parent);
+
condlog(3, "%s: subsystem = %s", pp->dev, parent->subsystem);

if (!strncmp(parent->subsystem, "scsi",4))
--
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 12:46 AM.

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