Author: cperciva
Date: Fri Aug 30 01:46:56 2013
New Revision: 255051
URL: http://svnweb.freebsd.org/changeset/base/255051

Log:
  If reading a virtual-device value fails, attempt to read a virtual-device-ext
  value.  Some hosts do not publish "extended" disk IDs via virtual-device in
  an attempt to avoid confusing old blkfront drivers, and without this change
  we failed to attach such disks.
  
  In particular, this commit allows all 24 ephemeral disks on EC2 hs1.8xlarge
  instances to be used, instead of only the first 15.
  
  MFC after:    3 days

Modified:
  head/sys/dev/xen/blkfront/blkfront.c

Modified: head/sys/dev/xen/blkfront/blkfront.c
==============================================================================
--- head/sys/dev/xen/blkfront/blkfront.c        Fri Aug 30 01:45:36 2013        
(r255050)
+++ head/sys/dev/xen/blkfront/blkfront.c        Fri Aug 30 01:46:56 2013        
(r255051)
@@ -1409,6 +1409,9 @@ xbd_attach(device_t dev)
        /* FIXME: Use dynamic device id if this is not set. */
        error = xs_scanf(XST_NIL, xenbus_get_node(dev),
            "virtual-device", NULL, "%" PRIu32, &vdevice);
+       if (error)
+               error = xs_scanf(XST_NIL, xenbus_get_node(dev),
+                   "virtual-device-ext", NULL, "%" PRIu32, &vdevice);
        if (error) {
                xenbus_dev_fatal(dev, error, "reading virtual-device");
                device_printf(dev, "Couldn't determine virtual device.\n");
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to