[dm-devel] multipath-tools/libmultipath discovery.c
bmarzins at sourceware.org
bmarzins at sourceware.org
Wed Aug 11 23:05:50 UTC 2010
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins at 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
More information about the dm-devel
mailing list