direct-io.hg

changeset 10340:88d867661599

[LINUX] A better way to stop blkdev request handling in blkfront
driver.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jun 13 15:33:10 2006 +0100 (2006-06-13)
parents 3d85c1136d63
children 0de8a4a023d0
files linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Jun 13 15:19:50 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Jun 13 15:33:10 2006 +0100
     1.3 @@ -596,8 +596,7 @@ void do_blkif_request(request_queue_t *r
     1.4  			continue;
     1.5  		}
     1.6  
     1.7 -		if (unlikely(info->connected != BLKIF_STATE_CONNECTED) ||
     1.8 -		    RING_FULL(&info->ring))
     1.9 +		if (RING_FULL(&info->ring))
    1.10  			goto wait;
    1.11  
    1.12  		DPRINTK("do_blk_req %p: cmd %p, sec %lx, "
    1.13 @@ -697,6 +696,7 @@ static void blkif_free(struct blkfront_i
    1.14  	spin_lock_irq(&blkif_io_lock);
    1.15  	info->connected = suspend ?
    1.16  		BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED;
    1.17 +	blk_stop_queue(info->rq); /* no more blkif_request() */
    1.18  	spin_unlock_irq(&blkif_io_lock);
    1.19  
    1.20  	/* Free resources associated with old device channel. */