ia64/xen-unstable

changeset 4415:6db79d6cee87

bitkeeper revision 1.1236.1.179 (424cff8aq22M6hToflNlSiSDAf7UEA)

Merge firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
author kaf24@firebug.cl.cam.ac.uk
date Fri Apr 01 08:00:10 2005 +0000 (2005-04-01)
parents bba86f62fccf d851c864a172
children 70ce80d7e30c
files linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Thu Mar 31 21:56:15 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Fri Apr 01 08:00:10 2005 +0000
     1.3 @@ -69,10 +69,16 @@ static PEND_RING_IDX pending_prod, pendi
     1.4  static kmem_cache_t *buffer_head_cachep;
     1.5  #else
     1.6  static request_queue_t *plugged_queue;
     1.7 -static inline void bdev_flush_queue(request_queue_t *q)
     1.8 +static inline void flush_plugged_queue(void)
     1.9  {
    1.10 -    if ( q->unplug_fn != NULL )
    1.11 -        q->unplug_fn(q);
    1.12 +    request_queue_t *q = plugged_queue;
    1.13 +    if ( q != NULL )
    1.14 +    {
    1.15 +        if ( q->unplug_fn != NULL )
    1.16 +            q->unplug_fn(q);
    1.17 +        blk_put_queue(q);
    1.18 +        plugged_queue = NULL;
    1.19 +    }
    1.20  }
    1.21  #endif
    1.22  
    1.23 @@ -200,11 +206,7 @@ static int blkio_schedule(void *arg)
    1.24  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
    1.25          run_task_queue(&tq_disk);
    1.26  #else
    1.27 -        if ( plugged_queue != NULL )
    1.28 -        {
    1.29 -            bdev_flush_queue(plugged_queue);
    1.30 -            plugged_queue = NULL;
    1.31 -        }
    1.32 +        flush_plugged_queue();
    1.33  #endif
    1.34      }
    1.35  }
    1.36 @@ -547,8 +549,8 @@ static void dispatch_rw_block_io(blkif_t
    1.37  
    1.38          if ( (q = bdev_get_queue(bio->bi_bdev)) != plugged_queue )
    1.39          {
    1.40 -            if ( plugged_queue != NULL )
    1.41 -                bdev_flush_queue(plugged_queue);
    1.42 +            flush_plugged_queue();
    1.43 +            blk_get_queue(q);
    1.44              plugged_queue = q;
    1.45          }
    1.46