From: Bart Van Assche <bart.vanassche@wdc.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bart.vanassche@wdc.com>,
Jianchao Wang <jianchao.w.wang@oracle.com>,
Andrew Randrianasulu <randrianasulu@gmail.com>
Subject: [PATCH] blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE
Date: Fri, 22 Jun 2018 13:18:09 -0700 [thread overview]
Message-ID: <20180622201809.25519-1-bart.vanassche@wdc.com> (raw)
Make sure that RQF_TIMED_OUT is cleared when a request is reused
after a block driver timeout handler has returned BLK_EH_DONE.
Fixes: da6612673988 ("blk-mq: don't time out requests again that are in the timeout handler")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jianchao Wang <jianchao.w.wang@oracle.com>
Cc: Andrew Randrianasulu <randrianasulu@gmail.com>
---
block/blk-mq.c | 1 -
block/blk-timeout.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index b97cb6fed3bd..8c00fcd300b9 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -785,7 +785,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
}
- req->rq_flags &= ~RQF_TIMED_OUT;
blk_add_timer(req);
}
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index c788255b18ad..d72e9071b17f 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -213,6 +213,7 @@ void blk_add_timer(struct request *req)
if (!req->timeout)
req->timeout = q->rq_timeout;
+ req->rq_flags &= ~RQF_TIMED_OUT;
blk_rq_set_deadline(req, jiffies + req->timeout);
/*
--
2.17.1
next reply other threads:[~2018-06-22 20:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 20:18 Bart Van Assche [this message]
2018-06-22 20:32 ` [PATCH] blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE Jens Axboe
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=20180622201809.25519-1-bart.vanassche@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jianchao.w.wang@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=randrianasulu@gmail.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