From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: jens.axboe@oracle.com
Cc: linux-kernel@vger.kernel.org, j-nomura@ce.jp.nec.com,
k-ueda@ct.jp.nec.com
Subject: [PATCH 2/3] block: change elevator to use blk-end-request
Date: Fri, 11 Jan 2008 16:50:47 -0500 (EST) [thread overview]
Message-ID: <20080111.165047.90117387.k-ueda@ct.jp.nec.com> (raw)
This patch converts elevator to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.
Related 'uptodate' arguments is converted to 'error'.
__blk_end_request() takes care of dequeueing request like below:
if (!list_empty(&rq->queuelist))
blkdev_dequeue_request(rq);
In the case of elv_next_request(), blkdev_dequeue_request() has not
been done and the queuelist isn't empty.
So __blk_end_request() calls blkdev_dequeue_request() and
the behavior of elv_next_request() doesn't change.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
---
block/elevator.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: 2.6.24-rc7/block/elevator.c
===================================================================
--- 2.6.24-rc7.orig/block/elevator.c
+++ 2.6.24-rc7/block/elevator.c
@@ -717,7 +717,7 @@ struct request *elv_next_request(struct
* not ever see it.
*/
if (blk_empty_barrier(rq)) {
- end_queued_request(rq, 1);
+ __blk_end_request(rq, 0, blk_rq_bytes(rq));
continue;
}
if (!(rq->cmd_flags & REQ_STARTED)) {
@@ -760,7 +760,7 @@ struct request *elv_next_request(struct
break;
} else if (ret == BLKPREP_KILL) {
rq->cmd_flags |= REQ_QUIET;
- end_queued_request(rq, 0);
+ __blk_end_request(rq, -EIO, blk_rq_bytes(rq));
} else {
printk(KERN_ERR "%s: bad return=%d\n", __FUNCTION__,
ret);
reply other threads:[~2008-01-11 21:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080111.165047.90117387.k-ueda@ct.jp.nec.com \
--to=k-ueda@ct.jp.nec.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=jens.axboe@oracle.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
all inboxes | Powered by JetHome®