[regression] nvme flush failed from v5.13-rc1

Keith Busch kbusch at kernel.org
Tue May 18 07:42:49 PDT 2021


On Tue, May 18, 2021 at 09:23:39PM +0800, Yi Zhang wrote:
> Hi
> commit[3] add a check to validates nsid which will lead nvme flush
> cmd[1] failed as the cmd.nsid will use the default nsid:
> NVME_NSID_ALL[2], that finally lead validate failed, any suggestions
> to fix it?

Flush is the only IO command that accepts a broadcast NSID, but the
kernel now prevents dispatching commands to anything but the NSID of the
block device that you dispatched it. Perhaps the kernel can relax that
requirement and accept "all namespaces" for IO commands (I'll look into
that).

I'll change nvme-cli to default to the block device's NSID, since that
should always work.

> [1]
> # nvme flush /dev/nvme0n1
> flush: Invalid argument
> # dmesg
> [  802.131609] nvme nvme0: nvme: nsid (4294967295) in cmd does not
> match nsid (1) of namespace
> 
> [2]
>         struct config cfg = {
>                 .namespace_id = NVME_NSID_ALL,
>         };
> 
> [3]
> commit c881a23fb6f7eb901155d25ba8dd1af0b8c7923b (HEAD, refs/bisect/bad)
> Author: Niklas Cassel <niklas.cassel at wdc.com>
> Date:   Fri Mar 26 19:48:00 2021 +0000
> 
>     nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev



More information about the Linux-nvme mailing list