From: Hannes Reinecke <hare@suse.de>
To: christophe varoqui <christophe.varoqui@free.fr>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: [PATCH] multipath: update discovery for sysfs layout changes
Date: Thu, 20 Mar 2008 09:28:31 +0100 [thread overview]
Message-ID: <47E2202F.7010208@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 465 bytes --]
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)
[-- Attachment #2: multipath-tools-update-for-new-sysfs-layout --]
[-- Type: text/plain, Size: 823 bytes --]
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))
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
reply other threads:[~2008-03-20 8:28 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=47E2202F.7010208@suse.de \
--to=hare@suse.de \
--cc=christophe.varoqui@free.fr \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.