|
@@ -2708,6 +2708,15 @@ static int __init xlblk_init(void)
|
|
if (!xen_domain())
|
|
if (!xen_domain())
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
+ if (!xen_has_pv_disk_devices())
|
|
|
|
+ return -ENODEV;
|
|
|
|
+
|
|
|
|
+ if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
|
|
|
|
+ pr_warn("xen_blk: can't get major %d with name %s\n",
|
|
|
|
+ XENVBD_MAJOR, DEV_NAME);
|
|
|
|
+ return -ENODEV;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (xen_blkif_max_segments < BLKIF_MAX_SEGMENTS_PER_REQUEST)
|
|
if (xen_blkif_max_segments < BLKIF_MAX_SEGMENTS_PER_REQUEST)
|
|
xen_blkif_max_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST;
|
|
xen_blkif_max_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST;
|
|
|
|
|
|
@@ -2723,15 +2732,6 @@ static int __init xlblk_init(void)
|
|
xen_blkif_max_queues = nr_cpus;
|
|
xen_blkif_max_queues = nr_cpus;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!xen_has_pv_disk_devices())
|
|
|
|
- return -ENODEV;
|
|
|
|
-
|
|
|
|
- if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
|
|
|
|
- printk(KERN_WARNING "xen_blk: can't get major %d with name %s\n",
|
|
|
|
- XENVBD_MAJOR, DEV_NAME);
|
|
|
|
- return -ENODEV;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
INIT_DELAYED_WORK(&blkfront_work, blkfront_delay_work);
|
|
INIT_DELAYED_WORK(&blkfront_work, blkfront_delay_work);
|
|
|
|
|
|
ret = xenbus_register_frontend(&blkfront_driver);
|
|
ret = xenbus_register_frontend(&blkfront_driver);
|