From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>, Shaohua Li <shli@fb.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] block: Refine blk_abort_request() documentation
Date: Mon, 11 May 2015 13:20:00 +0200 [thread overview]
Message-ID: <55509060.4010601@sandisk.com> (raw)
Document when it is safe to call this function for blk-mq queues.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Shaohua Li <shli@fb.com>
---
block/blk-timeout.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 246dfb1..d162500 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -149,10 +149,13 @@ void blk_rq_timed_out_timer(unsigned long data)
* blk_abort_request -- Request request recovery for the specified command
* @req: pointer to the request of interest
*
- * This function requests that the block layer start recovery for the
+ * This function requests that the block layer starts recovery for the
* request by deleting the timer and calling the q's timeout function.
* LLDDs who implement their own error recovery MAY ignore the timeout
- * event if they generated blk_abort_req. Must hold queue lock.
+ * event if they generated blk_abort_req. The caller must hold the queue lock
+ * if @req->q is a traditional block layer queue. However, if @req->q is a
+ * blk-mq queue then it is up to the caller to ensure that this function is
+ * only called after @req->q->mq_ops->queue_rq(@req) has finished.
*/
void blk_abort_request(struct request *req)
{
--
2.1.4
next reply other threads:[~2015-05-11 11:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 11:20 Bart Van Assche [this message]
2015-05-11 11:44 ` [PATCH] block: Refine blk_abort_request() documentation Christoph Hellwig
2015-05-11 16:58 ` 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=55509060.4010601@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=shli@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.