mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "jianchao.wang" <jianchao.w.wang@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, 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
Date: Tue, 19 Jun 2018 22:52:33 +0800	[thread overview]
Message-ID: <5a952345-c245-57ee-29c7-4022e1664a46@oracle.com> (raw)
In-Reply-To: <20180619140942.GA13089@lst.de>

Hi Christoph

Thanks for your kindly response.
The patch I posted ('scsi_transport_fc: use __blk_complete_request in fc_bsg_job_timeout')
is just based on code review. I don't have actual issue on it. :)

Thanks
Jianchao

On 06/19/2018 10:09 PM, Christoph Hellwig wrote:
> Does the patch below fix your FC issue?
> 
> ---
>>From 5e5b4fc51c84a0f5c27f2f770be7a4eaed0f6e8c Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> 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 <jianchao.w.wang@oracle.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  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;
>  }
>  
> 

      reply	other threads:[~2018-06-19 14:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15  1:57 Jianchao Wang
2018-06-15  1:57 ` [PATCH 2/2] scsi_transport_fc: use __blk_complete_request in fc_bsg_job_timeout Jianchao Wang
2018-06-15  2:17 ` [PATCH 1/2] block: export __blk_complete_request Ming Lei
2018-06-15  2:22   ` jianchao.wang
2018-06-15  2:44     ` jianchao.wang
2018-06-15  2:56       ` Ming Lei
2018-06-15  3:04         ` jianchao.wang
2018-06-15  3:20           ` Ming Lei
2018-06-15  3:26             ` jianchao.wang
2018-06-15  4:03               ` Ming Lei
2018-06-15  5:10                 ` jianchao.wang
2018-06-15 11:58             ` Christoph Hellwig
2018-06-15  2:49     ` Ming Lei
2018-06-19 14:09 ` Christoph Hellwig
2018-06-19 14:52   ` jianchao.wang [this message]

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=5a952345-c245-57ee-29c7-4022e1664a46@oracle.com \
    --to=jianchao.w.wang@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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®