nvme-cli/0001-default-flush-to-use-block-device-nsid.patch
Maurizio Lombardi 2427bc5b2d nvme flush failed from from v5.13-rc1
Resolves: #1962422

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
2021-06-14 14:47:01 +02:00

34 lines
1.0 KiB
Diff

From 6abc4f36b38aa6be3c7e4b89e2997e5006e40b37 Mon Sep 17 00:00:00 2001
From: Keith Busch <kbusch@kernel.org>
Date: Tue, 1 Jun 2021 07:01:44 -0700
Subject: [PATCH] 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 <kbusch@kernel.org>
---
nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nvme.c b/nvme.c
index 87e1a82..1666ba5 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) = {
--
2.31.1