mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: jens.axboe@oracle.com
Cc: rusty@rustcorp.com.au, oakad@yahoo.com, adrian@mcmen.demon.co.uk,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	j-nomura@ce.jp.nec.com, k-ueda@ct.jp.nec.com
Subject: [PATCH 1/5] virtio_blk: change to use __blk_end_request()
Date: Wed, 01 Oct 2008 10:11:20 -0400 (EDT)	[thread overview]
Message-ID: <20081001.101120.41628825.k-ueda@ct.jp.nec.com> (raw)
In-Reply-To: <20081001.100942.74754500.k-ueda@ct.jp.nec.com>

This patch converts virtio_blk to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.
Related 'uptodate' argument is converted to 'error'.


Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <jens.axboe@oracle.com>
---
 drivers/block/virtio_blk.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6-block/drivers/block/virtio_blk.c
===================================================================
--- linux-2.6-block.orig/drivers/block/virtio_blk.c
+++ linux-2.6-block/drivers/block/virtio_blk.c
@@ -47,20 +47,20 @@ static void blk_done(struct virtqueue *v
 
 	spin_lock_irqsave(&vblk->lock, flags);
 	while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) {
-		int uptodate;
+		int error;
 		switch (vbr->status) {
 		case VIRTIO_BLK_S_OK:
-			uptodate = 1;
+			error = 0;
 			break;
 		case VIRTIO_BLK_S_UNSUPP:
-			uptodate = -ENOTTY;
+			error = -ENOTTY;
 			break;
 		default:
-			uptodate = 0;
+			error = -EIO;
 			break;
 		}
 
-		end_dequeued_request(vbr->req, uptodate);
+		__blk_end_request(vbr->req, error, blk_rq_bytes(vbr->req));
 		list_del(&vbr->list);
 		mempool_free(vbr, vblk->pool);
 	}

  reply	other threads:[~2008-10-01 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01 14:09 [PATCH 0/5] block: remove end_{queued|dequeued}_request() Kiyoshi Ueda
2008-10-01 14:11 ` Kiyoshi Ueda [this message]
2008-10-02  4:52   ` [PATCH 1/5] virtio_blk: change to use __blk_end_request() Rusty Russell
2008-10-01 14:12 ` [PATCH 2/5] memstick: " Kiyoshi Ueda
2008-10-01 14:13 ` [PATCH 3/5] gdrom: " Kiyoshi Ueda
2008-10-01 14:13 ` [PATCH 4/5] block: change elevator " Kiyoshi Ueda
2008-10-01 14:14 ` [PATCH 5/5] block: remove end_{queued|dequeued}_request() Kiyoshi Ueda
2008-10-01 14:19 ` [PATCH 0/5] " Jens Axboe

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=20081001.101120.41628825.k-ueda@ct.jp.nec.com \
    --to=k-ueda@ct.jp.nec.com \
    --cc=adrian@mcmen.demon.co.uk \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=oakad@yahoo.com \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®