Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   blk: Mark requests aborted (http://www.linux-archive.org/device-mapper-development/365797-blk-mark-requests-aborted.html)

Mike Anderson 05-04-2010 03:37 AM

blk: Mark requests aborted
 
Mark requests aborted using blk_mark_rq_aborted to assist lower levels in
identifying aborted requests.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Cc: Jens Axobe <jens.axboe@oracle.com>
---
block/blk-timeout.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)

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
--
1.6.6.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Hannes Reinecke 05-04-2010 10:44 AM

blk: Mark requests aborted
 
Mike Anderson wrote:
> Mark requests aborted using blk_mark_rq_aborted to assist lower levels in
> identifying aborted requests.
>
> Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
> Cc: Jens Axobe <jens.axboe@oracle.com>
Acked-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 09:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.