From: Keith Busch Date: Tue, 1 Jun 2021 14:01:44 +0000 (-0700) Subject: default flush to use block device nsid X-Git-Tag: v1.15~61 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6abc4f36b38aa6be3c7e4b89e2997e5006e40b37;p=users%2Fsagi%2Fnvme-cli.git default flush to use block device nsid Kernel 5.13 added checks to ensure the ioctl path can't be abused to access a different namespace than the one user space has permission to open. This unfortunately breaks the all-nsid flush usage, so user tooling needs to default to the device's namespace id. Link: https://lore.kernel.org/linux-nvme/20210518144249.GE2709569@dhcp-10-100-145-180.wdc.com/T/#t Link: https://github.com/linux-nvme/nvme-cli/issues/1066 Signed-off-by: Keith Busch --- diff --git a/nvme.c b/nvme.c index 87e1a827..1666ba55 100644 --- a/nvme.c +++ b/nvme.c @@ -4384,7 +4384,7 @@ static int flush(int argc, char **argv, struct command *cmd, struct plugin *plug }; struct config cfg = { - .namespace_id = NVME_NSID_ALL, + .namespace_id = 0, }; OPT_ARGS(opts) = {