bitkeeper revision 1.1159.45.8 (4125bdd65AGH_yEQnU1cGd31tL8SuA)

Add a timeout to blkif connect.
This commit is contained in:
akw27@labyrinth.cl.cam.ac.uk committed 2004-08-20 09:01:10 +00:00
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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.