From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753760AbbEKLxt (ORCPT ); Mon, 11 May 2015 07:53:49 -0400 Received: from mail-bl2on0094.outbound.protection.outlook.com ([65.55.169.94]:46240 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753381AbbEKLxc (ORCPT ); Mon, 11 May 2015 07:53:32 -0400 X-Greylist: delayed 1121 seconds by postgrey-1.27 at vger.kernel.org; Mon, 11 May 2015 07:53:32 EDT Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none; X-AuditID: ac160a69-f79656d000003967-e2-55509062002e Message-ID: <55509060.4010601@sandisk.com> Date: Mon, 11 May 2015 13:20:00 +0200 From: Bart Van Assche User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jens Axboe CC: Christoph Hellwig , Shaohua Li , linux-kernel Subject: [PATCH] block: Refine blk_abort_request() documentation Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsWyRoxnkW7ShIBQg//7lCz+7znGZrFy9VEm i8u75rBZLNvZz+LA4jGx+R27x+6bDWwenzfJBTBHcdmkpOZklqUW6dslcGVsbZrNVHCOq2LN huUsDYxXOLoYOTkkBEwkDvffZoewxSQu3FvP1sXIxSEkcIJR4tzOGywQzg5GiT+HtjPCdFxu v8YOkdjMKDF/ylMmkASvgJbE50N7mEFsFgFViRn7trOB2GwCRhLf3s9kAbFFBcIkpv1+zgpR LyhxcuYTsLiIgKzE992vweqZBbIl5rT/ApspLOAgcXzBNqCZHEBxTYn1u/QhSuQltr+dwwxy g4TAJFaJTec+g9ULCahLnFwyn2kCo9AsJCtmIbTPQt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SFV:NSPM;SFS:(10009020)(6009001)(438002)(189002)(199003)(5001960100002)(110136002)(50466002)(4001350100001)(83506001)(36756003)(189998001)(65806001)(19580405001)(46102003)(19580395003)(86362001)(92566002)(47776003)(117636001)(54356999)(23676002)(59896002)(99136001)(50986999)(87266999)(229853001)(77156002)(62966003)(87936001)(77096005)(62816006);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR02MB277;H:milsmgep12.sandisk.com;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB277; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BLUPR02MB277;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB277; X-Forefront-PRVS: 05739BA1B5 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2015 11:20:02.9388 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d;Ip=[63.163.107.173];Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB277 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document when it is safe to call this function for blk-mq queues. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Shaohua Li --- 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