diff options
author | cperciva <cperciva@FreeBSD.org> | 2013-08-30 01:46:56 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2013-08-30 01:46:56 +0000 |
commit | 70b405bb1a0f0eb79efc5bbe4242c98baa4e1cbc (patch) | |
tree | 0e67dae4e5bb0c77e982b2bf302ec51738a96d4f | |
parent | 053a3cacff702378b4362f2285aae5b54b38cc1a (diff) | |
download | FreeBSD-src-70b405bb1a0f0eb79efc5bbe4242c98baa4e1cbc.zip FreeBSD-src-70b405bb1a0f0eb79efc5bbe4242c98baa4e1cbc.tar.gz |
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
-rw-r--r-- | sys/dev/xen/blkfront/blkfront.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index 7d70f42..feb79a1 100644 --- a/sys/dev/xen/blkfront/blkfront.c +++ b/sys/dev/xen/blkfront/blkfront.c @@ -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"); |