public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: "Ed L. Cashin" <ecashin@coraid.com>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 11/15] aoe: use bio->bi_idx
Date: Wed, 18 Oct 2006 13:09:02 -0700	[thread overview]
Message-ID: <11612021821994-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <1161202179462-git-send-email-greg@kroah.com>

From: Ed L. Cashin <ecashin@coraid.com>

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>
---
 drivers/block/aoe/aoeblk.c |    3 ++-
 drivers/block/aoe/aoecmd.c |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index a7dbe6f..196ae7a 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -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 --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index f2b8f55..2d0bcdd 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -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;
 	}
-- 
1.4.2.4


  reply	other threads:[~2006-10-18 20:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18 20:04 [GIT PATCH] AOE fixes and update for 2.6.19-rc2 Greg KH
2006-10-18 20:08 ` [PATCH 1/15] aoe: eliminate isbusy message Greg KH
2006-10-18 20:08   ` [PATCH 2/15] aoe: update copyright date Greg KH
2006-10-18 20:08     ` [PATCH 3/15] aoe: remove unused NARGS enum Greg KH
2006-10-18 20:08       ` [PATCH 4/15] aoe: zero copy write 1 of 2 Greg KH
2006-10-18 20:08         ` [PATCH 5/15] aoe: jumbo frame support " Greg KH
2006-10-18 20:08           ` [PATCH 6/15] aoe: clean up printks via macros Greg KH
2006-10-18 20:08             ` [PATCH 7/15] aoe: jumbo frame support 2 of 2 Greg KH
2006-10-18 20:08               ` [PATCH 8/15] aoe: improve retransmission heuristics Greg KH
2006-10-18 20:09                 ` [PATCH 9/15] aoe: zero copy write 2 of 2 Greg KH
2006-10-18 20:09                   ` [PATCH 10/15] aoe: module parameter for device timeout Greg KH
2006-10-18 20:09                     ` Greg KH [this message]
2006-10-18 20:09                       ` [PATCH 12/15] aoe: remove sysfs comment Greg KH
2006-10-18 20:09                         ` [PATCH 13/15] aoe: update driver version Greg KH
2006-10-18 20:09                           ` [PATCH 14/15] aoe: revert printk macros Greg KH
2006-10-18 20:09                             ` [PATCH 15/15] aoe: fix sysfs_create_file warnings Greg KH

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=11612021821994-git-send-email-greg@kroah.com \
    --to=greg@kroah.com \
    --cc=ecashin@coraid.com \
    --cc=gregkh@suse.de \
    --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