mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1159.45.8 (4125bdd65AGH_yEQnU1cGd31tL8SuA)
Add a timeout to blkif connect.
This commit is contained in:
1 parent
2d02990327
commit
cc248cb607
1 file changed
+4
-1
@@ -1215,12 +1215,15 @@ int __init xlblk_init(void)
|
||||
* for notifications before proceeding. For now we assume that we
|
||||
* will be notified of exactly one interface.
|
||||
*/
|
||||
while ( blkif_state != BLKIF_STATE_CONNECTED )
|
||||
for ( i=0; (blkif_state != BLKIF_STATE_CONNECTED) && (i < 10*HZ); i++ )
|
||||
{
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
schedule_timeout(1);
|
||||
}
|
||||
|
||||
if (blkif_state != BLKIF_STATE_CONNECTED)
|
||||
printk(KERN_INFO "Timeout connecting block device driver!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||