ia64/xen-unstable

changeset 2353:9e3b9c9938cc

bitkeeper revision 1.1159.54.1 (412e6241CCJDiaJTDiwZxUEAHptmNA)

Fix exporting of whole disks as VBDs.
author iap10@labyrinth.cl.cam.ac.uk
date Thu Aug 26 22:20:49 2004 +0000 (2004-08-26)
parents 34e52c54c854
children 761c36876724
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	Tue Aug 24 15:12:02 2004 +0000
     1.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c	Thu Aug 26 22:20:49 2004 +0000
     1.3 @@ -32,7 +32,7 @@ typedef unsigned char byte; /* from linu
     1.4  static unsigned int blkif_state = BLKIF_STATE_CLOSED;
     1.5  static unsigned int blkif_evtchn, blkif_irq;
     1.6  
     1.7 -static int blkif_control_rsp_valid;
     1.8 +static volatile int blkif_control_rsp_valid;
     1.9  static blkif_response_t blkif_control_rsp;
    1.10  
    1.11  static blkif_ring_t *blk_ring;
    1.12 @@ -1125,16 +1125,20 @@ static void blkif_status_change(blkif_fe
    1.13              recovery = 0;
    1.14              wmb();
    1.15  
    1.16 +	    blkif_state = BLKIF_STATE_CONNECTED;
    1.17 +
    1.18              /* Kicks things back into life. */
    1.19              flush_requests();
    1.20          }
    1.21          else
    1.22          {
    1.23 +	    /* transtion to connected in case we need to do a 
    1.24 +	       a partion probe on a whole disk */
    1.25 +	    blkif_state = BLKIF_STATE_CONNECTED;
    1.26 +
    1.27              /* Probe for discs that are attached to the interface. */
    1.28              xlvbd_init();
    1.29          }
    1.30 -
    1.31 -        blkif_state = BLKIF_STATE_CONNECTED;
    1.32          
    1.33          /* Kick pending requests. */
    1.34          spin_lock_irq(&blkif_io_lock);