Skip to contentSkip to conversation

issuing flush to all namespaces

DISCUSSION Klaus Jensen 2 participants 3 messages Jul 14, 2022 NVMe

lore
Share & tools
lore
#0 lore raw

Hi,

Since the (very reasonable) changes that cause the driver to check that the nsid of the command corresponds to the nsid of the namespace being targeted it is no longer possible to issue a flush to all namespaces:

   # nvme flush /dev/nvme0n1 -n 0xffffffff
   flush: Invalid argument

Now, I think we can all agree that Flush is the odd one out here, but can we do anything about it? The char devices also check the nsid, so they can't be used either.

#1 lore raw
Quoted 6 lines · Klaus Jensen

Hi,

Since the (very reasonable) changes that cause the driver to check that the nsid of the command corresponds to the nsid of the namespace being targeted it is no longer possible to issue a flush to all namespaces:

Quoted 6 lines
   # nvme flush /dev/nvme0n1 -n 0xffffffff
   flush: Invalid argument

Now, I think we can all agree that Flush is the odd one out here, but can we do anything about it? The char devices also check the nsid, so they can't be used either.

Don't do it. Sending flush to all namespaces wasn't even clearly defined until I think NVMe 1.4 with the supported bits. It doesn't really make much sense and there is no point in supporting it in Linux.

#2 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 9 lines · Klaus Jensen

Hi,

Since the (very reasonable) changes that cause the driver to check that the nsid of the command corresponds to the nsid of the namespace being targeted it is no longer possible to issue a flush to all namespaces:

   # nvme flush /dev/nvme0n1 -n 0xffffffff
   flush: Invalid argument
Quoted 7 lines
Quoted 3 lines

Now, I think we can all agree that Flush is the odd one out here, but can we do anything about it? The char devices also check the nsid, so they can't be used either.

Don't do it. Sending flush to all namespaces wasn't even clearly defined until I think NVMe 1.4 with the supported bits. It doesn't really make much sense and there is no point in supporting it in Linux.

Alright, I hear you :) Thanks!