ia64/xen-unstable

changeset 4412:bba86f62fccf

bitkeeper revision 1.1236.1.178 (424c71ffL0fO0Lled7Iksns4CZgUlw)

manual merge.
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 31 21:56:15 2005 +0000 (2005-03-31)
parents e0ebda45aae6 3e78eadd8fb9
children 6db79d6cee87
files linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6.11-xen-sparse/drivers/xen/blkback/common.h linux-2.6.11-xen-sparse/drivers/xen/blkback/vbd.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Thu Mar 31 21:36:33 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Thu Mar 31 21:56:15 2005 +0000
     1.3 @@ -69,16 +69,10 @@ 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 -void bdev_put(struct block_device *bdev)
     1.8 +static inline void bdev_flush_queue(request_queue_t *q)
     1.9  {
    1.10 -    request_queue_t *q = plugged_queue;
    1.11 -    /* We might be giving up last reference to plugged queue. Flush if so. */
    1.12 -    if ( (q != NULL) &&
    1.13 -         (q == bdev_get_queue(bdev)) && 
    1.14 -         (cmpxchg(&plugged_queue, q, NULL) == q) )
    1.15 -        blk_run_queue(q);
    1.16 -    /* It's now safe to drop the block device. */
    1.17 -    blkdev_put(bdev);
    1.18 +    if ( q->unplug_fn != NULL )
    1.19 +        q->unplug_fn(q);
    1.20  }
    1.21  #endif
    1.22  
    1.23 @@ -208,7 +202,7 @@ static int blkio_schedule(void *arg)
    1.24  #else
    1.25          if ( plugged_queue != NULL )
    1.26          {
    1.27 -            blk_run_queue(plugged_queue);
    1.28 +            bdev_flush_queue(plugged_queue);
    1.29              plugged_queue = NULL;
    1.30          }
    1.31  #endif
    1.32 @@ -554,7 +548,7 @@ static void dispatch_rw_block_io(blkif_t
    1.33          if ( (q = bdev_get_queue(bio->bi_bdev)) != plugged_queue )
    1.34          {
    1.35              if ( plugged_queue != NULL )
    1.36 -                blk_run_queue(plugged_queue);
    1.37 +                bdev_flush_queue(plugged_queue);
    1.38              plugged_queue = q;
    1.39          }
    1.40  
     2.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/common.h	Thu Mar 31 21:36:33 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/common.h	Thu Mar 31 21:56:15 2005 +0000
     2.3 @@ -31,10 +31,8 @@
     2.4  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
     2.5  typedef struct rb_root rb_root_t;
     2.6  typedef struct rb_node rb_node_t;
     2.7 -extern void bdev_put(struct block_device *bdev);
     2.8  #else
     2.9  struct block_device;
    2.10 -#define bdev_put(_b) ((void)0)
    2.11  #endif
    2.12  
    2.13  typedef struct blkif_st {
     3.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/vbd.c	Thu Mar 31 21:36:33 2005 +0000
     3.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/vbd.c	Thu Mar 31 21:56:15 2005 +0000
     3.3 @@ -17,8 +17,10 @@ static inline dev_t vbd_map_devnum(blkif
     3.4  { return MKDEV(cookie>>8, cookie&0xff); }
     3.5  #define vbd_sz(_v)   ((_v)->bdev->bd_part ? \
     3.6      (_v)->bdev->bd_part->nr_sects : (_v)->bdev->bd_disk->capacity)
     3.7 +#define bdev_put(_b) blkdev_put(_b)
     3.8  #else
     3.9  #define vbd_sz(_v)   (blk_size[MAJOR((_v)->pdevice)][MINOR((_v)->pdevice)]*2)
    3.10 +#define bdev_put(_b) ((void)0)
    3.11  #endif
    3.12  
    3.13  void vbd_create(blkif_be_vbd_create_t *create)