diff --git a/.gitignore b/.gitignore index 088df82..d1efbb3 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /ndctl-71.tar.gz /ndctl-71.1.tar.gz /ndctl-78.tar.gz +/ndctl-82.tar.gz diff --git a/0001-test-daxctl-devices.sh-increase-the-namespace-size.patch b/0001-test-daxctl-devices.sh-increase-the-namespace-size.patch deleted file mode 100644 index 7f3642b..0000000 --- a/0001-test-daxctl-devices.sh-increase-the-namespace-size.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 95e837700d0229c2a75ca6b77e7ed0f74ae2f433 Mon Sep 17 00:00:00 2001 -From: Jeff Moyer -Date: Tue, 12 Dec 2023 16:59:54 -0500 -Subject: [PATCH 1/3] test/daxctl-devices.sh: increase the namespace size - -Memory hotplug requires the namespace to be aligned to a boundary that -depends on several factors. Upstream kernel commit fe124c95df9e -("x86/mm: use max memory block size on bare metal") increased the -typical size/alignment to 2GiB from 256MiB. As a result, this test no -longer passes on our bare metal test systems. - -This patch fixes the test failure by bumping the namespace size to -4GiB, which leaves room for aligning the start and end to 2GiB. - -Signed-off-by: Jeff Moyer - -Related: RHEL-10382diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh -index 56c9691..dfce74b 100755 ---- - test/daxctl-devices.sh | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh -index 56c9691..dfce74b 100755 ---- a/test/daxctl-devices.sh -+++ b/test/daxctl-devices.sh -@@ -44,7 +44,10 @@ setup_dev() - test -n "$testdev" - - "$NDCTL" destroy-namespace -f -b "$testbus" "$testdev" -- testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 256M | \ -+ # x86_64 memory hotplug can require up to a 2GiB-aligned chunk -+ # of memory. Create a 4GiB namespace, so that we will still have -+ # enough room left after aligning the start and end. -+ testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 4G | \ - jq -er '.dev') - test -n "$testdev" - } --- -2.39.3 - diff --git a/0002-ndctl-vendor-iniparser.patch b/0002-ndctl-vendor-iniparser.patch index fb7191c..5c3b617 100644 --- a/0002-ndctl-vendor-iniparser.patch +++ b/0002-ndctl-vendor-iniparser.patch @@ -10,27 +10,10 @@ project that wishes to use it, so that's what this patch does. Signed-off-by: Jeff Moyer Related: RHEL-10382 ---- - LICENSES/other/iniparser-MIT | 21 + - meson.build | 20 +- - meson_options.txt | 2 - - util/dictionary.c | 380 ++++++++++++++++ - util/dictionary.h | 173 ++++++++ - util/iniparser.c | 836 +++++++++++++++++++++++++++++++++++ - util/iniparser.h | 358 +++++++++++++++ - util/meson.build | 3 +- - 8 files changed, 1771 insertions(+), 22 deletions(-) - create mode 100644 LICENSES/other/iniparser-MIT - create mode 100644 util/dictionary.c - create mode 100644 util/dictionary.h - create mode 100644 util/iniparser.c - create mode 100644 util/iniparser.h -diff --git a/LICENSES/other/iniparser-MIT b/LICENSES/other/iniparser-MIT -new file mode 100644 -index 0000000..5a3a80b ---- /dev/null -+++ b/LICENSES/other/iniparser-MIT +diff -up ndctl-82/LICENSES/other/iniparser-MIT.orig ndctl-82/LICENSES/other/iniparser-MIT +--- ndctl-82/LICENSES/other/iniparser-MIT.orig 2025-08-27 11:03:40.040540977 -0400 ++++ ndctl-82/LICENSES/other/iniparser-MIT 2025-08-27 11:03:40.040521648 -0400 @@ -0,0 +1,21 @@ +Copyright (c) 2000-2011 by Nicolas Devillard. +MIT License @@ -53,10 +36,9 @@ index 0000000..5a3a80b +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + -diff --git a/meson.build b/meson.build -index ef001f8..2cb188f 100644 ---- a/meson.build -+++ b/meson.build +diff -up ndctl-82/meson.build.orig ndctl-82/meson.build +--- ndctl-82/meson.build.orig 2025-06-11 20:12:07.000000000 -0400 ++++ ndctl-82/meson.build 2025-08-27 11:03:40.040695614 -0400 @@ -5,6 +5,7 @@ project('ndctl', 'c', 'LGPL-2.1', 'CC0-1.0', @@ -91,11 +73,10 @@ index ef001f8..2cb188f 100644 conf = configuration_data() check_headers = [ ['HAVE_DLFCN_H', 'dlfcn.h'], -diff --git a/meson_options.txt b/meson_options.txt -index 5c41b1a..2209eab 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -24,7 +24,5 @@ option('pkgconfiglibdir', type : 'string', value : '', +diff -up ndctl-82/meson_options.txt.orig ndctl-82/meson_options.txt +--- ndctl-82/meson_options.txt.orig 2025-06-11 20:12:07.000000000 -0400 ++++ ndctl-82/meson_options.txt 2025-08-27 11:03:40.040793793 -0400 +@@ -24,8 +24,6 @@ option('pkgconfiglibdir', type : 'string description : 'directory for standard pkg-config files') option('bashcompletiondir', type : 'string', description : '''${datadir}/bash-completion/completions''') @@ -103,11 +84,10 @@ index 5c41b1a..2209eab 100644 - description : 'Path containing the iniparser header files') option('modprobedatadir', type : 'string', description : '''${sysconfdir}/modprobe.d/''') -diff --git a/util/dictionary.c b/util/dictionary.c -new file mode 100644 -index 0000000..aa3d232 ---- /dev/null -+++ b/util/dictionary.c + option('fwctl', type : 'feature', value : 'enabled', +diff -up ndctl-82/util/dictionary.c.orig ndctl-82/util/dictionary.c +--- ndctl-82/util/dictionary.c.orig 2025-08-27 11:03:40.040910751 -0400 ++++ ndctl-82/util/dictionary.c 2025-08-27 11:03:40.040890551 -0400 @@ -0,0 +1,380 @@ +/*-------------------------------------------------------------------------*/ +/** @@ -489,11 +469,9 @@ index 0000000..aa3d232 + } + return ; +} -diff --git a/util/dictionary.h b/util/dictionary.h -new file mode 100644 -index 0000000..f0fd540 ---- /dev/null -+++ b/util/dictionary.h +diff -up ndctl-82/util/dictionary.h.orig ndctl-82/util/dictionary.h +--- ndctl-82/util/dictionary.h.orig 2025-08-27 11:03:40.041006380 -0400 ++++ ndctl-82/util/dictionary.h 2025-08-27 11:03:40.040993950 -0400 @@ -0,0 +1,173 @@ + +/*-------------------------------------------------------------------------*/ @@ -668,11 +646,9 @@ index 0000000..f0fd540 +#endif + +#endif -diff --git a/util/iniparser.c b/util/iniparser.c -new file mode 100644 -index 0000000..dbceb20 ---- /dev/null -+++ b/util/iniparser.c +diff -up ndctl-82/util/iniparser.c.orig ndctl-82/util/iniparser.c +--- ndctl-82/util/iniparser.c.orig 2025-08-27 11:03:40.041195706 -0400 ++++ ndctl-82/util/iniparser.c 2025-08-27 11:03:40.041164137 -0400 @@ -0,0 +1,836 @@ + +/*-------------------------------------------------------------------------*/ @@ -1510,11 +1486,9 @@ index 0000000..dbceb20 +{ + dictionary_del(d); +} -diff --git a/util/iniparser.h b/util/iniparser.h -new file mode 100644 -index 0000000..37ff7b7 ---- /dev/null -+++ b/util/iniparser.h +diff -up ndctl-82/util/iniparser.h.orig ndctl-82/util/iniparser.h +--- ndctl-82/util/iniparser.h.orig 2025-08-27 11:03:40.041324024 -0400 ++++ ndctl-82/util/iniparser.h 2025-08-27 11:03:40.041304934 -0400 @@ -0,0 +1,358 @@ + +/*-------------------------------------------------------------------------*/ @@ -1874,10 +1848,9 @@ index 0000000..37ff7b7 +#endif + +#endif -diff --git a/util/meson.build b/util/meson.build -index a6ded7e..97b27b5 100644 ---- a/util/meson.build -+++ b/util/meson.build +diff -up ndctl-82/util/meson.build.orig ndctl-82/util/meson.build +--- ndctl-82/util/meson.build.orig 2025-06-11 20:12:07.000000000 -0400 ++++ ndctl-82/util/meson.build 2025-08-27 11:03:40.041394234 -0400 @@ -12,8 +12,9 @@ util = static_library('util', [ 'bitmap.c', 'abspath.c', @@ -1889,6 +1862,3 @@ index a6ded7e..97b27b5 100644 include_directories : root_inc, ) util_dep = declare_dependency(link_with : util) --- -2.39.3 - diff --git a/30aca93-test-dax.sh-adjust-trace-parsing-of-fault-results.patch b/30aca93-test-dax.sh-adjust-trace-parsing-of-fault-results.patch new file mode 100644 index 0000000..8c24646 --- /dev/null +++ b/30aca93-test-dax.sh-adjust-trace-parsing-of-fault-results.patch @@ -0,0 +1,42 @@ +test/dax.sh: adjust trace parsing of fault results + +JIRA: https://issues.redhat.com/browse/RHEL-98531 + +commit 30aca9314e91f385c85dfc1866f0da282dbba1cd +Author: Dan Williams +Date: Wed Jun 18 15:21:28 2025 -0700 + + test/dax.sh: adjust trace parsing of fault results + + With current kernel+tracecmd combinations stdout is no longer purely + trace records and column "21" is no longer the vmfault_t result. + + Drop, if present, the diagnostic print of how many CPUs are in the trace + and use the more universally compatible assumption that the fault result + is the last column rather than a specific column. + + Note that dax.sh is not a unit test on its own, but rather is included in + both dax-xfs.h and dax-ext4.sh. + + [ as: only feed trace lines with dax_pmd_fault_done to awk ] + + Signed-off-by: Dan Williams + Reviewed-by: Dave Jiang + Link: https://lore.kernel.org/r/20250618222130.672621-4-dan.j.williams@intel.com + Signed-off-by: Alison Schofield + +Signed-off-by: Jeff Moyer + +diff --git a/test/dax.sh b/test/dax.sh +index 3ffbc80..2eec7a6 100755 +--- a/test/dax.sh ++++ b/test/dax.sh +@@ -43,7 +43,7 @@ run_test() { + fi + fi + count=$((count + 1)) +- done < <(trace-cmd report | awk '{ print $21 }') ++ done < <(trace-cmd report | grep dax_pmd_fault_done | awk '{ print $NF }') + + if [ $count -lt 10 ]; then + cleanup "$1" diff --git a/ndctl.spec b/ndctl.spec index 0b03753..0bc5cd0 100644 --- a/ndctl.spec +++ b/ndctl.spec @@ -1,13 +1,13 @@ Name: ndctl -Version: 78 -Release: 2%{?dist} +Version: 82 +Release: 1%{?dist} Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory) License: GPLv2 Url: https://github.com/pmem/ndctl Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch0: 0001-test-daxctl-devices.sh-increase-the-namespace-size.patch Patch1: 0002-ndctl-vendor-iniparser.patch Patch2: 0003-ndctl-check-the-old-directory-for-monitor.conf.patch +Patch3: 30aca93-test-dax.sh-adjust-trace-parsing-of-fault-results.patch Requires: ndctl-libs%{?_isa} = %{version}-%{release} Requires: daxctl-libs%{?_isa} = %{version}-%{release} @@ -210,6 +210,10 @@ libcxl is a library for enumerating and communicating with CXL devices. %changelog +* Wed Aug 27 2025 Jeff Moyer - 82-1 +- Rebase to v82 +- Resolve: RHEL-97669 + * Fri Jul 26 2024 Jeff Moyer - 78-2 - Add explicit package version requirements. (Jeff Moyer) - Related: RHEL-29151 diff --git a/sources b/sources index b77d4b6..890fe0e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ndctl-78.tar.gz) = ad217dd45c8d6bbd0089a88c46e1e04813b65e97c8817aaddeca967b20ce948e76c4b7ede5517c45d0b645b5c3dc61aac95cc944e8e5fc60100e45b41f13f2a0 +SHA512 (ndctl-82.tar.gz) = 15b3533862adbb7261bc63fdb5e75ec0da5f7c4ce4d306ec8587c83eeb92abe2c2f03640aad157da0791492d4f3688d8203f965443662dff5da78b0940cdc6d7