lkml.org 
[lkml]   [2006]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.6.18-rc4] aoe [11/14]: use bio->bi_idx
From
Instead of starting with bio->bi_io_vec, use the offset in bio->bi_idx.

Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
---

diff -upr 2.6.18-rc4-orig/drivers/block/aoe/aoeblk.c 2.6.18-rc4-aoe/drivers/block/aoe/aoeblk.c
--- 2.6.18-rc4-orig/drivers/block/aoe/aoeblk.c 2006-09-20 14:29:35.000000000 -0400
+++ 2.6.18-rc4-aoe/drivers/block/aoe/aoeblk.c 2006-09-20 14:29:36.000000000 -0400
@@ -142,7 +142,8 @@ aoeblk_make_request(request_queue_t *q,
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;

diff -upr 2.6.18-rc4-orig/drivers/block/aoe/aoecmd.c 2.6.18-rc4-aoe/drivers/block/aoe/aoecmd.c
--- 2.6.18-rc4-orig/drivers/block/aoe/aoecmd.c 2006-09-20 14:29:36.000000000 -0400
+++ 2.6.18-rc4-aoe/drivers/block/aoe/aoecmd.c 2006-09-20 14:29:36.000000000 -0400
@@ -166,6 +166,7 @@ aoecmd_ata_rw(struct aoedev *d, struct 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;
}

--
"Ed L. Cashin" <ecashin@coraid.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-20 21:03    [W:0.039 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site