* [PATCH][RESEND] multipath: fix cciss device names
@ 2012-07-27 20:57 Benjamin Marzinski
2012-08-17 19:57 ` Christophe Varoqui
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Marzinski @ 2012-07-27 20:57 UTC (permalink / raw)
To: device-mapper development; +Cc: Christophe Varoqui
When we're looking for cciss devices in sysfs, they have a "!" not a "/".
If users run multipath on a cciss device using it's devnode name,
/dev/cciss/cXdY, multipath should convert that to the sysfs name.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipath/main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: multipath-tools-120518/multipath/main.c
===================================================================
--- multipath-tools-120518.orig/multipath/main.c
+++ multipath-tools-120518/multipath/main.c
@@ -409,6 +409,16 @@ get_dev_type(char *dev) {
return DEV_DEVMAP;
}
+static void
+convert_dev(char *dev)
+{
+ char *ptr = strstr(dev, "cciss/");
+ if (ptr) {
+ ptr += 5;
+ *ptr = '!';
+ }
+}
+
int
main (int argc, char *argv[])
{
@@ -514,6 +524,8 @@ main (int argc, char *argv[])
strncpy(conf->dev, argv[optind], FILE_NAME_SIZE);
conf->dev_type = get_dev_type(conf->dev);
+ if (conf->dev_type == DEV_DEVNODE)
+ convert_dev(conf->dev);
}
conf->daemon = 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][RESEND] multipath: fix cciss device names
2012-07-27 20:57 [PATCH][RESEND] multipath: fix cciss device names Benjamin Marzinski
@ 2012-08-17 19:57 ` Christophe Varoqui
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Varoqui @ 2012-08-17 19:57 UTC (permalink / raw)
To: Benjamin Marzinski; +Cc: device-mapper development, Christophe Varoqui
On ven., 2012-07-27 at 15:57 -0500, Benjamin Marzinski wrote:
> When we're looking for cciss devices in sysfs, they have a "!" not a "/".
> If users run multipath on a cciss device using it's devnode name,
> /dev/cciss/cXdY, multipath should convert that to the sysfs name.
>
Applied.
Thanks.
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
> multipath/main.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> Index: multipath-tools-120518/multipath/main.c
> ===================================================================
> --- multipath-tools-120518.orig/multipath/main.c
> +++ multipath-tools-120518/multipath/main.c
> @@ -409,6 +409,16 @@ get_dev_type(char *dev) {
> return DEV_DEVMAP;
> }
>
> +static void
> +convert_dev(char *dev)
> +{
> + char *ptr = strstr(dev, "cciss/");
> + if (ptr) {
> + ptr += 5;
> + *ptr = '!';
> + }
> +}
> +
> int
> main (int argc, char *argv[])
> {
> @@ -514,6 +524,8 @@ main (int argc, char *argv[])
>
> strncpy(conf->dev, argv[optind], FILE_NAME_SIZE);
> conf->dev_type = get_dev_type(conf->dev);
> + if (conf->dev_type == DEV_DEVNODE)
> + convert_dev(conf->dev);
> }
> conf->daemon = 0;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-17 19:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-27 20:57 [PATCH][RESEND] multipath: fix cciss device names Benjamin Marzinski
2012-08-17 19:57 ` Christophe Varoqui
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).