mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Hannes Reinecke <hare@suse.de>,
	Stefan Weinhuber <wein@de.ibm.com>
Subject: [PATCH 7/9] block: check for timeout function in blk_rq_timed_out()
Date: Mon,  3 Jun 2013 17:03:20 +0200	[thread overview]
Message-ID: <1370271802-30019-8-git-send-email-schwidefsky@de.ibm.com> (raw)
In-Reply-To: <1370271802-30019-1-git-send-email-schwidefsky@de.ibm.com>

From: Hannes Reinecke <hare@suse.de>

rq_timed_out_fn might have been unset while the request
was in flight, so we need to check for it in blk_rq_timed_out().

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
 block/blk-timeout.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 6e4744c..65f1035 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -82,9 +82,10 @@ void blk_delete_timer(struct request *req)
 static void blk_rq_timed_out(struct request *req)
 {
 	struct request_queue *q = req->q;
-	enum blk_eh_timer_return ret;
+	enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
 
-	ret = q->rq_timed_out_fn(req);
+	if (q->rq_timed_out_fn)
+		ret = q->rq_timed_out_fn(req);
 	switch (ret) {
 	case BLK_EH_HANDLED:
 		__blk_complete_request(req);
-- 
1.7.9.5


  parent reply	other threads:[~2013-06-03 15:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 15:03 [PATCH 0/9] dasd: implement block timeout Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 1/9] dasd: Clarify comment Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 2/9] dasd: make number of retries configurable Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 3/9] dasd: process all requests in the device tasklet Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 4/9] dasd: Implement block timeout handling Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 5/9] dasd: Reduce amount of messages for specific errors Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 6/9] block,dasd: detailed I/O errors Martin Schwidefsky
2013-06-03 15:03 ` Martin Schwidefsky [this message]
2013-06-03 15:03 ` [PATCH 8/9] dasd: Add 'timeout' attribute Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 9/9] dasd: Fail all requests when DASD_FLAG_ABORTIO is set Martin Schwidefsky
2013-06-17  7:22 ` [PATCH 0/9] dasd: implement block timeout Martin Schwidefsky
2013-07-01  8:21   ` Martin Schwidefsky
2013-07-01  9:47     ` Jens Axboe
2013-07-01 11:10       ` Martin Schwidefsky
  -- strict thread matches above, loose matches on Subject: below --
2013-01-30  9:26 [PATCH 0/9][v2] " Hannes Reinecke
2013-01-30  9:26 ` [PATCH 7/9] block: check for timeout function in blk_rq_timed_out() Hannes Reinecke
2013-01-29  7:11 [PATCH 0/9] dasd: implement block timeout Hannes Reinecke
2013-01-29  7:11 ` [PATCH 7/9] block: check for timeout function in blk_rq_timed_out() Hannes Reinecke

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=1370271802-30019-8-git-send-email-schwidefsky@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=wein@de.ibm.com \
    /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®