public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ed L. Cashin" <ecashin@coraid.com>
To: linux-kernel@vger.kernel.org
Cc: ecashin@coraid.com, Greg K-H <greg@kroah.com>
Subject: [PATCH 2.6.18-rc4] aoe [11/13]: use bio->bi_idx
Date: Fri, 18 Aug 2006 13:40:04 -0400	[thread overview]
Message-ID: <a6963b591178293af24ac01fca759209@coraid.com> (raw)
In-Reply-To: E1GE8K3-0008Jn-00@kokone.coraid.com

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

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

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-08-17 16:45:34.000000000 -0400
+++ 2.6.18-rc4-aoe/drivers/block/aoe/aoeblk.c	2006-08-17 16:45:34.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-08-17 16:45:34.000000000 -0400
+++ 2.6.18-rc4-aoe/drivers/block/aoe/aoecmd.c	2006-08-17 16:45:34.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>

  parent reply	other threads:[~2006-08-18 18:56 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1GE8K3-0008Jn-00@kokone.coraid.com>
2006-08-18 17:38 ` [PATCH 2.6.18-rc4] aoe [02/13]: update copyright date Ed L. Cashin
2006-08-18 22:54   ` Alan Cox
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [03/13]: remove unused NARGS enum Ed L. Cashin
2006-08-18 22:54   ` Alan Cox
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [04/13]: zero copy write 1 of 2 Ed L. Cashin
2006-08-19 10:18   ` Alan Cox
2006-08-22 21:21     ` Ed L. Cashin
2006-08-23 15:03       ` Alan Cox
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [05/13]: jumbo frame support " Ed L. Cashin
2006-08-18 22:56   ` Alan Cox
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [06/13]: clean up printks via macros Ed L. Cashin
2006-08-18 19:29   ` Arnd Bergmann
2006-08-18 22:23     ` Ed L. Cashin
2006-08-18 22:57   ` Alan Cox
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [07/13]: jumbo frame support 2 of 2 Ed L. Cashin
2006-08-18 22:58   ` Alan Cox
2006-08-18 23:04     ` Ed L. Cashin
2006-08-19  0:08       ` Alan Cox
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [08/13]: improve retransmission heuristics Ed L. Cashin
2006-08-18 23:02   ` Alan Cox
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [09/13]: zero copy write 2 of 2 Ed L. Cashin
2006-08-18 17:39 ` [PATCH 2.6.18-rc4] aoe [10/13]: module parameter for device timeout Ed L. Cashin
2006-08-18 23:03   ` Alan Cox
2006-08-18 23:10     ` Ed L. Cashin
2006-08-19  0:09       ` Alan Cox
2006-08-21 22:45         ` Ed L. Cashin
2006-08-18 17:40 ` Ed L. Cashin [this message]
2006-08-18 17:40 ` [PATCH 2.6.18-rc4] aoe [12/13]: remove sysfs comment Ed L. Cashin
2006-08-18 17:40 ` [PATCH 2.6.18-rc4] aoe [13/13]: update driver version Ed L. Cashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6963b591178293af24ac01fca759209@coraid.com \
    --to=ecashin@coraid.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox