[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <516302383.30860772.1562736406606.JavaMail.zimbra@kalray.eu>
Date: Wed, 10 Jul 2019 07:26:46 +0200 (CEST)
From: Marta Rybczynska <mrybczyn@...ray.eu>
To: Christoph Hellwig <hch@....de>
Cc: Max Gurtovoy <maxg@...lanox.com>, kbusch <kbusch@...nel.org>,
axboe <axboe@...com>, Sagi Grimberg <sagi@...mberg.me>,
linux-nvme <linux-nvme@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Samuel Jones <sjones@...ray.eu>,
Jean-Baptiste Riaux <jbriaux@...ray.eu>
Subject: Re: [PATCH v2] nvme: fix multipath crash when ANA desactivated
----- On 9 Jul, 2019, at 23:29, Christoph Hellwig hch@....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
Powered by blists - more mailing lists