Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5218452imm; Tue, 19 Jun 2018 07:02:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJdVwbEcW0l1kWJDtaPQja1tQ4oTNgZ+K2GGqh/FGgyPjdjLJePhRX7Nhwij0rHTYR77GJg X-Received: by 2002:a63:7986:: with SMTP id u128-v6mr14678412pgc.273.1529416960394; Tue, 19 Jun 2018 07:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529416960; cv=none; d=google.com; s=arc-20160816; b=Lzpj/EDFRnpD+ZzOgSh+zIcil4BHpW3Y4JEHuAOGOp0Tm9Uf6mJsBp2obkqyngKcJW Znlg31gTnTUB/dzdS76GQyB5X8Y5QAgohuGiPQzWbdM8TIMM88T1qaaOiuflu+BNYslq mRB/7Gky/hHugrh27A4CKAYfv/IGrHsSDqqpYuh4+/2arMBFK+/mWZv6SZ50LF2X1aoC t84+tOikIfrLm35kGOkYCAvjfI3JbuS4kFJjpyA3xer3RZ50qHrhyYz5+X5VLJnxgpcD ROFN4Yp3srA5mEAacqBBBU1E5KkJjUvxSbIfC5mQeqUyaXJjJ/CJP0F1QWDqdG+6pdd0 EmxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=8A5f069BGMLjBUGchA0JzU1iRslkAGSleYW/g9Pn6X8=; b=USlvA7MRNrMN1RMbBTah2hm2Zd0XIxglkX8Vh6+pTGyINmXWiH5hcwBzcwipq2RBHd 84X/z4ItIyG8EZVuUj1q+AJw2ANHjteLlwDodFCnPvDZdfjkoZQ/leaUGH5SpDkmr8kf LX3c+hmFAZA7gpNXtANdR7I4V30iqPk5qidEseW5uwmtphsqjSI7Pc1h+FP4+Sa/aNoH 9WDi6SdOm6VS0Hv5Fz9LVkgcqjs3DhkmpfyNLgzsOFE5ZOUeG7gekUdEpCtDcQEtDCUY mbDhMbVfAeK0pech6G+TA1H7fl5XUlAAxHYkzJuTQ0nFeFXaka/bZjojgF4jbSbaaO0O xQbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si17528338plo.322.2018.06.19.07.02.26; Tue, 19 Jun 2018 07:02:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966502AbeFSOAm (ORCPT + 99 others); Tue, 19 Jun 2018 10:00:42 -0400 Received: from verein.lst.de ([213.95.11.211]:41279 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966077AbeFSOAl (ORCPT ); Tue, 19 Jun 2018 10:00:41 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 596B168E49; Tue, 19 Jun 2018 16:09:42 +0200 (CEST) Date: Tue, 19 Jun 2018 16:09:42 +0200 From: Christoph Hellwig To: Jianchao Wang Cc: axboe@kernel.dk, hch@lst.de, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] block: export __blk_complete_request Message-ID: <20180619140942.GA13089@lst.de> References: <1529027847-29085-1-git-send-email-jianchao.w.wang@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1529027847-29085-1-git-send-email-jianchao.w.wang@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Does the patch below fix your FC issue? --- From 5e5b4fc51c84a0f5c27f2f770be7a4eaed0f6e8c Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 19 Jun 2018 13:59:52 +0200 Subject: block: fix timeout changes for legacy request drivers blk_mq_complete_request can only be called for blk-mq drivers, but when removing the BLK_EH_HANDLED return value, two legacy request timeout methods incorrectly got switched to call blk_mq_complete_request. Call __blk_complete_request instead to reinstance the previous behavior. For that __blk_complete_request needs to be exported. Fixes: 1fc2b62e ("scsi_transport_fc: complete requests from ->timeout") Fixes: 0df0bb08 ("null_blk: complete requests from ->timeout") Reported-by: Jianchao Wang Signed-off-by: Christoph Hellwig --- block/blk-softirq.c | 1 + drivers/block/null_blk.c | 2 +- drivers/scsi/scsi_transport_fc.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/blk-softirq.c b/block/blk-softirq.c index 01e2b353a2b9..15c1f5e12eb8 100644 --- a/block/blk-softirq.c +++ b/block/blk-softirq.c @@ -144,6 +144,7 @@ void __blk_complete_request(struct request *req) local_irq_restore(flags); } +EXPORT_SYMBOL(__blk_complete_request); /** * blk_complete_request - end I/O on a request diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 7948049f6c43..042c778e5a4e 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -1365,7 +1365,7 @@ static blk_qc_t null_queue_bio(struct request_queue *q, struct bio *bio) static enum blk_eh_timer_return null_rq_timed_out_fn(struct request *rq) { pr_info("null: rq %p timed out\n", rq); - blk_mq_complete_request(rq); + __blk_complete_request(rq); return BLK_EH_DONE; } diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 1da3d71e9f61..13948102ca29 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -3592,7 +3592,7 @@ fc_bsg_job_timeout(struct request *req) /* the blk_end_sync_io() doesn't check the error */ if (inflight) - blk_mq_complete_request(req); + __blk_complete_request(req); return BLK_EH_DONE; } -- 2.17.1