Commit 1e09d11c authored by Jens Axboe's avatar Jens Axboe

[PATCH] xfs, use bio_add_page()

XFS now needs to use bio_add_page() as not to build bio's of the wrong
size. Also makes the bio build nicer.
parent 08435553
...@@ -1453,7 +1453,6 @@ pagebuf_iorequest( /* start real I/O */ ...@@ -1453,7 +1453,6 @@ pagebuf_iorequest( /* start real I/O */
bio = bio_alloc(GFP_NOIO, nr_pages); bio = bio_alloc(GFP_NOIO, nr_pages);
BUG_ON(bio == NULL); BUG_ON(bio == NULL);
bio_init(bio);
bio->bi_bdev = pb->pb_target->pbr_bdev; bio->bi_bdev = pb->pb_target->pbr_bdev;
bio->bi_sector = sector; bio->bi_sector = sector;
bio->bi_end_io = bio_end_io_pagebuf; bio->bi_end_io = bio_end_io_pagebuf;
...@@ -1467,12 +1466,8 @@ pagebuf_iorequest( /* start real I/O */ ...@@ -1467,12 +1466,8 @@ pagebuf_iorequest( /* start real I/O */
if (nbytes > size) if (nbytes > size)
nbytes = size; nbytes = size;
bio->bi_vcnt++; if (bio_add_page(bio, pb->pb_pages[map_i], nbytes, offset))
bio->bi_size += nbytes; break;
bvec->bv_page = pb->pb_pages[map_i];
bvec->bv_len = nbytes;
bvec->bv_offset = offset;
offset = 0; offset = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment