linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marta Rybczynska <mrybczyn@kalray.eu>
To: Christoph Hellwig <hch@lst.de>
Cc: Max Gurtovoy <maxg@mellanox.com>, kbusch <kbusch@kernel.org>,
	axboe <axboe@fb.com>, Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme <linux-nvme@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Samuel Jones <sjones@kalray.eu>,
	Jean-Baptiste Riaux <jbriaux@kalray.eu>
Subject: Re: [PATCH v2] nvme: fix multipath crash when ANA desactivated
Date: Wed, 10 Jul 2019 07:26:46 +0200 (CEST)	[thread overview]
Message-ID: <516302383.30860772.1562736406606.JavaMail.zimbra@kalray.eu> (raw)
In-Reply-To: <20190709212904.GB9636@lst.de>



----- On 9 Jul, 2019, at 23:29, Christoph Hellwig hch@lst.de wrote:

> On Sat, Jul 06, 2019 at 01:06:44PM +0300, Max Gurtovoy wrote:
>>> +	/* check if multipath is enabled and we have the capability */
>>> +	if (!multipath)
>>> +		return 0;
>>> +	if (!ctrl->subsys || ((ctrl->subsys->cmic & (1 << 3)) != 0))
>>
>> shouldn't it be:
>>
>> if (!ctrl->subsys || ((ctrl->subsys->cmic & (1 << 3)) == 0))
>>
>> or
>>
>> if (!ctrl->subsys || !(ctrl->subsys->cmic & (1 << 3)))
>>
>>
>> Otherwise, you don't really do any initialization and return 0 in case you have
>> the capability, right ?
> 
> Yes.  FYI, my idea how to fix this would be something like:

Thanks both, error when changing the condition on my side. I submit the next
version very soon.

Christoph, why would you like to put the use_ana function in the header?
It isn't used anywhere else outside of that file.

Regards,
Marta

  reply	other threads:[~2019-07-10  5:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 14:05 [PATCH v2] nvme: fix multipath crash when ANA desactivated Marta Rybczynska
2019-07-06 10:06 ` Max Gurtovoy
2019-07-09 21:29   ` Christoph Hellwig
2019-07-10  5:26     ` Marta Rybczynska [this message]
2019-07-10 16:38       ` Christoph Hellwig
2019-07-12 13:08         ` Marta Rybczynska
2019-07-10  8:53     ` Max Gurtovoy

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=516302383.30860772.1562736406606.JavaMail.zimbra@kalray.eu \
    --to=mrybczyn@kalray.eu \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=jbriaux@kalray.eu \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=maxg@mellanox.com \
    --cc=sagi@grimberg.me \
    --cc=sjones@kalray.eu \
    /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;
as well as URLs for NNTP newsgroup(s).