nvme flush failed from from v5.13-rc1
Resolves: #1962422 Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
This commit is contained in:
parent
e9d5aedb0f
commit
2427bc5b2d
33
0001-default-flush-to-use-block-device-nsid.patch
Normal file
33
0001-default-flush-to-use-block-device-nsid.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: nvme-cli
|
Name: nvme-cli
|
||||||
Version: 1.14
|
Version: 1.14
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: NVMe management command line interface
|
Summary: NVMe management command line interface
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -11,6 +11,7 @@ URL: https://github.com/linux-nvme/nvme-cli
|
|||||||
Source0: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
|
Source0: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: nvme-cli-makefile-dont-install-host-params-patch
|
Patch0: nvme-cli-makefile-dont-install-host-params-patch
|
||||||
|
Patch1: 0001-default-flush-to-use-block-device-nsid.patch
|
||||||
|
|
||||||
BuildRequires: libuuid-devel
|
BuildRequires: libuuid-devel
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -24,6 +25,7 @@ nvme-cli provides NVM-Express user space tooling for Linux.
|
|||||||
#%%setup -qn %%{name}-%%{commit0}
|
#%%setup -qn %%{name}-%%{commit0}
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -81,6 +83,9 @@ if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-2
|
||||||
|
- Fix for bz1962422 (nvme flush failed from from v5.13-rc1)
|
||||||
|
|
||||||
* Mon May 03 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-1
|
* Mon May 03 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-1
|
||||||
- Update to the latest upstream version
|
- Update to the latest upstream version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user