multipath-tools/libmultipath discovery.c
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: [email protected] 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.
libmultipath/discovery.c +7 -0
@@ -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