ia64/xen-unstable
changeset 2312:daaae24db2d1
bitkeeper revision 1.1159.45.8 (4125bdd65AGH_yEQnU1cGd31tL8SuA)
Add a timeout to blkif connect.
Add a timeout to blkif connect.
author | akw27@labyrinth.cl.cam.ac.uk |
---|---|
date | Fri Aug 20 09:01:10 2004 +0000 (2004-08-20) |
parents | 26d16f44dc58 |
children | 0d0b3847e406 |
files | linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c |
line diff
1.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c Fri Aug 20 07:43:55 2004 +0000 1.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c Fri Aug 20 09:01:10 2004 +0000 1.3 @@ -1215,12 +1215,15 @@ int __init xlblk_init(void) 1.4 * for notifications before proceeding. For now we assume that we 1.5 * will be notified of exactly one interface. 1.6 */ 1.7 - while ( blkif_state != BLKIF_STATE_CONNECTED ) 1.8 + for ( i=0; (blkif_state != BLKIF_STATE_CONNECTED) && (i < 10*HZ); i++ ) 1.9 { 1.10 set_current_state(TASK_INTERRUPTIBLE); 1.11 schedule_timeout(1); 1.12 } 1.13 1.14 + if (blkif_state != BLKIF_STATE_CONNECTED) 1.15 + printk(KERN_INFO "Timeout connecting block device driver!\n"); 1.16 + 1.17 return 0; 1.18 } 1.19