You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
xen blkfront: Delay wait for block devices until after the disk is added
When the xen block frontend driver is built as a module the module load is only synchronous up to the point where the frontend and the backend become connected rather than when the disk is added. This means that there can be a race on boot between loading the module and loading the dm-* modules and doing the scan for LVM physical volumes (all in the initrd). In the failure case the disk is not present until after the scan for physical volumes is complete. Taken from: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/11483a00c017 Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Ingo Molnar
parent
53f0e8afcb
commit
1d78d70556
@@ -846,6 +846,7 @@ static int is_disconnected_device(struct device *dev, void *data)
|
||||
{
|
||||
struct xenbus_device *xendev = to_xenbus_device(dev);
|
||||
struct device_driver *drv = data;
|
||||
struct xenbus_driver *xendrv;
|
||||
|
||||
/*
|
||||
* A device with no driver will never connect. We care only about
|
||||
@@ -858,7 +859,9 @@ static int is_disconnected_device(struct device *dev, void *data)
|
||||
if (drv && (dev->driver != drv))
|
||||
return 0;
|
||||
|
||||
return (xendev->state != XenbusStateConnected);
|
||||
xendrv = to_xenbus_driver(dev->driver);
|
||||
return (xendev->state != XenbusStateConnected ||
|
||||
(xendrv->is_ready && !xendrv->is_ready(xendev)));
|
||||
}
|
||||
|
||||
static int exists_disconnected_device(struct device_driver *drv)
|
||||
|
||||
Reference in New Issue
Block a user