diff mbox

[7/9] blk: Mark requests aborted

Message ID 1272944228-30511-8-git-send-email-andmike@linux.vnet.ibm.com (mailing list archive)
State Changes Requested, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Mike Anderson May 4, 2010, 3:37 a.m. UTC
None
diff mbox

Patch

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index ad45b44..d8610c1 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -229,9 +229,17 @@  void blk_abort_queue(struct request_queue *q)
 	 */
 	list_splice_init(&q->timeout_list, &list);
 
-	list_for_each_entry_safe(rq, tmp, &list, timeout_list)
+	list_for_each_entry_safe(rq, tmp, &list, timeout_list) {
+                /*
+                 * Mark all requests even if we are unable to abort. The
+                 * aborted flag can used by lower levels to indicate that
+                 * the request should finished as soon as possible.
+                 */
+		blk_mark_rq_aborted(rq);
+
 		if (!blk_queue_stopped(q))
 			blk_abort_request(rq);
+	}
 
 	/*
 	 * Occasionally, blk_abort_request() will return without