ia64/xen-unstable

changeset 4398:deebfbea73d9

bitkeeper revision 1.1159.258.81 (424bba4091aV1FuNksY_4w_z4Tvr3g)

Backport of Jens blkdev performance patch. I accidentally applied it
first to unstable.
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 31 08:52:16 2005 +0000 (2005-03-31)
parents 4a09c134b726
children 404af33b77b7 1c0462767898
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 08:04:01 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Thu Mar 31 08:52:16 2005 +0000
     1.3 @@ -481,7 +481,6 @@ static void dispatch_rw_block_io(blkif_t
     1.4      for ( i = 0; i < nr_psegs; i++ )
     1.5      {
     1.6          struct bio *bio;
     1.7 -        struct bio_vec *bv;
     1.8  
     1.9          bio = bio_alloc(GFP_ATOMIC, 1);
    1.10          if ( unlikely(bio == NULL) )
    1.11 @@ -494,17 +493,14 @@ static void dispatch_rw_block_io(blkif_t
    1.12          bio->bi_private = pending_req;
    1.13          bio->bi_end_io  = end_block_io_op;
    1.14          bio->bi_sector  = phys_seg[i].sector_number;
    1.15 -        bio->bi_rw      = operation;
    1.16  
    1.17 -        bv = bio_iovec_idx(bio, 0);
    1.18 -        bv->bv_page   = virt_to_page(MMAP_VADDR(pending_idx, i));
    1.19 -        bv->bv_len    = phys_seg[i].nr_sects << 9;
    1.20 -        bv->bv_offset = phys_seg[i].buffer & ~PAGE_MASK;
    1.21 +        bio_add_page(
    1.22 +            bio,
    1.23 +            virt_to_page(MMAP_VADDR(pending_idx, i)),
    1.24 +            phys_seg[i].nr_sects << 9,
    1.25 +            phys_seg[i].buffer & ~PAGE_MASK);
    1.26  
    1.27 -        bio->bi_size    = bv->bv_len;
    1.28 -        bio->bi_vcnt++;
    1.29 -
    1.30 -        submit_bio(operation, bio);
    1.31 +        submit_bio(operation | (1 << BIO_RW_SYNC), bio);
    1.32      }
    1.33  #endif
    1.34