1
0
Fork 0

aoe: use bio->bi_idx

Instead of starting with bio->bi_io_vec, use the offset in bio->bi_idx.

Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hifive-unleashed-5.1
Ed L. Cashin 2006-09-20 14:36:50 -04:00 committed by Greg Kroah-Hartman
parent b751e8b659
commit 392e4845f9
2 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,8 @@ aoeblk_make_request(request_queue_t *q, struct bio *bio)
buf->bio = bio;
buf->resid = bio->bi_size;
buf->sector = bio->bi_sector;
buf->bv = buf->bio->bi_io_vec;
buf->bv = &bio->bi_io_vec[bio->bi_idx];
WARN_ON(buf->bv->bv_len == 0);
buf->bv_resid = buf->bv->bv_len;
buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset;

View File

@ -166,6 +166,7 @@ aoecmd_ata_rw(struct aoedev *d, struct frame *f)
d->inprocess = NULL;
} else if (buf->bv_resid == 0) {
buf->bv++;
WARN_ON(buf->bv->bv_len == 0);
buf->bv_resid = buf->bv->bv_len;
buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset;
}