All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Sagi Grimberg <sagi@grimberg.me>,
	Laurence Oberman <loberman@redhat.com>,
	Ming Lei <tom.leiming@gmail.com>,
	jianchao.w.wang@oracle.com
Cc: linux-rdma <linux-rdma@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Jens Axboe <axboe@fb.com>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Panic when rebooting target server testing srp on 5.0.0-rc2
Date: Wed, 03 Apr 2019 14:54:19 -0700	[thread overview]
Message-ID: <1554328459.118779.236.camel@acm.org> (raw)
In-Reply-To: <71cb067b-2267-c151-dbdc-a21f78d5fb0c@grimberg.me>

On Wed, 2019-04-03 at 14:47 -0700, Sagi Grimberg wrote:
> > I have not been able to reproduce this issue. But you may want to try
> > the following patch (applies on top of v5.1-rc3):
> > 
> > 
> > Subject: [PATCH] block: Fix blk_mq_try_issue_directly()
> > 
> > If blk_mq_try_issue_directly() returns BLK_STS*_RESOURCE that means that
> > the request has not been queued and that the caller should retry to submit
> > the request. Both blk_mq_request_bypass_insert() and
> > blk_mq_sched_insert_request() guarantee that a request will be processed.
> > Hence return BLK_STS_OK if one of these functions is called. This patch
> > avoids that blk_mq_dispatch_rq_list() crashes when using dm-mpath.
> > 
> > Reported-by: Laurence Oberman <loberman@redhat.com>
> > Fixes: 7f556a44e61d ("blk-mq: refactor the code of issue request directly") # v5.0.
> > Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> > ---
> >   block/blk-mq.c | 9 ++-------
> >   1 file changed, 2 insertions(+), 7 deletions(-)
> > 
> > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > index 652d0c6d5945..b2c20dce8a30 100644
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -1859,16 +1859,11 @@ blk_status_t blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx,
> >   	case BLK_STS_RESOURCE:
> >   		if (force) {
> >   			blk_mq_request_bypass_insert(rq, run_queue);
> > -			/*
> > -			 * We have to return BLK_STS_OK for the DM
> > -			 * to avoid livelock. Otherwise, we return
> > -			 * the real result to indicate whether the
> > -			 * request is direct-issued successfully.
> > -			 */
> > -			ret = bypass ? BLK_STS_OK : ret;
> > +			ret = BLK_STS_OK;
> >   		} else if (!bypass) {
> >   			blk_mq_sched_insert_request(rq, false,
> >   						    run_queue, false);
> > +			ret = BLK_STS_OK;
> >   		}
> 
> I would move the ret assignment here after the condition statement.

How is that expected to work for the !force && bypass case? I don't
want to alter "ret" in that case.

Thanks,

Bart.

      reply	other threads:[~2019-04-03 21:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6e19971d315f4a3ce2cc20a1c6693f4a263a280c.camel@redhat.com>
     [not found] ` <7858e19ce3fc3ebf7845494a2209c58cd9e3086d.camel@redhat.com>
     [not found]   ` <1553113730.65329.60.camel@acm.org>
     [not found]     ` <3645c45e88523d4b242333d96adbb492ab100f97.camel@redhat.com>
     [not found]       ` <d9febee1de759206bbf4d66f6570415ae64e4f33.camel@redhat.com>
2019-03-26 15:16         ` Panic when rebooting target server testing srp on 5.0.0-rc2 Laurence Oberman
2019-03-26 19:06           ` Laurence Oberman
2019-04-03 14:53             ` Laurence Oberman
2019-04-03 15:09               ` Bart Van Assche
2019-04-03 17:58                 ` Laurence Oberman
2019-03-27  1:40           ` Ming Lei
2019-03-27 12:35             ` Laurence Oberman
2019-03-27 12:56               ` Laurence Oberman
2019-03-27 22:00                 ` Laurence Oberman
2019-03-27 23:34                   ` Laurence Oberman
2019-03-28  1:31                     ` Ming Lei
2019-03-28 14:58                       ` Laurence Oberman
2019-03-28 15:09                         ` Laurence Oberman
2019-04-03 17:52                   ` Bart Van Assche
2019-04-03 17:59                     ` Laurence Oberman
2019-04-03 18:43                     ` Laurence Oberman
2019-04-03 21:47                     ` Sagi Grimberg
2019-04-03 21:54                       ` Bart Van Assche [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=1554328459.118779.236.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@fb.com \
    --cc=jianchao.w.wang@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=sagi@grimberg.me \
    --cc=tom.leiming@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 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.