Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d85532ed284e63b5c56eaf2418f262822af60be4
Commit:     d85532ed284e63b5c56eaf2418f262822af60be4
Parent:     8578007065bd27ec077a74b5814f0fe4df040180
Author:     Jens Axboe <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 9 12:52:45 2007 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Fri Nov 9 12:52:45 2007 +0100

    block: fix requeue handling in blk_queue_invalidate_tags()
    
    Credit goes to [EMAIL PROTECTED] for diagnosing this issue
    and supplying the initial patch.
    
    blk_queue_invalidate_tags() must use the proper requeueing paths instead
    of open coding the re-add of the request, otherwise we bug out in rq
    accounting. Just switch to using blk_requeue_request(), that takes care
    of end-tag handling as well and also adds the blktrace REQUEUE notify
    event that is also appropriate here.
    
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/ll_rw_blk.c |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 75c98d5..3d48991 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1143,22 +1143,9 @@ EXPORT_SYMBOL(blk_queue_start_tag);
 void blk_queue_invalidate_tags(struct request_queue *q)
 {
        struct list_head *tmp, *n;
-       struct request *rq;
-
-       list_for_each_safe(tmp, n, &q->tag_busy_list) {
-               rq = list_entry_rq(tmp);
 
-               if (rq->tag == -1) {
-                       printk(KERN_ERR
-                              "%s: bad tag found on list\n", __FUNCTION__);
-                       list_del_init(&rq->queuelist);
-                       rq->cmd_flags &= ~REQ_QUEUED;
-               } else
-                       blk_queue_end_tag(q, rq);
-
-               rq->cmd_flags &= ~REQ_STARTED;
-               __elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 0);
-       }
+       list_for_each_safe(tmp, n, &q->tag_busy_list)
+               blk_requeue_request(q, list_entry_rq(tmp));
 }
 
 EXPORT_SYMBOL(blk_queue_invalidate_tags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to