dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools/libmultipath discovery.c
Date: 11 Aug 2010 23:05:50 -0000	[thread overview]
Message-ID: <20100811230550.32654.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL5_FC6
Changes by:	bmarzins@sourceware.org	2010-08-11 23:05:50

Modified files:
	libmultipath   : discovery.c 

Log message:
	Fix for bz #576600
	Patch to allow multipath to handle virtio devices. Mostly for testing purposes.

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.14&r2=1.32.2.15

--- multipath-tools/libmultipath/discovery.c	2010/06/23 16:28:07	1.32.2.14
+++ multipath-tools/libmultipath/discovery.c	2010/08/11 23:05:50	1.32.2.15
@@ -481,6 +481,7 @@
 	char attr_path[FILE_NAME_SIZE];
 	char attr_buff[FILE_NAME_SIZE];
 	unsigned int unused;
+	char vdisk;
 
 	pp->bus = SYSFS_BUS_UNDEF;
 
@@ -489,6 +490,12 @@
 		strcpy(pp->product_id, "GNBD");
 		pp->hwe = find_hwe(conf->hwtable, pp->vendor_id, pp->product_id);
 		return 0;
+	} else if (sscanf(pp->dev, "vd%c", &vdisk) == 1 &&
+		   'a' <= vdisk && vdisk <= 'z'){
+		strcpy(pp->vendor_id,  "VIRTIO");
+		strcpy(pp->product_id, "VIRTIO");
+		pp->hwe = find_hwe(conf->hwtable, pp->vendor_id, pp->product_id);
+		return 0;
 	}
 	/*
 	 * This is ugly : we should be able to do a simple

             reply	other threads:[~2010-08-11 23:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 23:05 bmarzins [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-20 21:24 multipath-tools/libmultipath discovery.c bmarzins
2011-03-07 15:45 bmarzins
2010-05-25 23:23 bmarzins
2009-11-23 21:08 bmarzins
2008-04-14 17:59 bmarzins
2008-03-05 20:53 bmarzins
2006-10-06 18:35 bmarzins
2006-10-06 18:09 bmarzins

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=20100811230550.32654.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).