Hello community,

here is the log from the commit of package ndctl for openSUSE:Leap:15.2 checked 
in at 2020-04-30 18:51:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ndctl (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.ndctl.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ndctl"

Thu Apr 30 18:51:18 2020 rev:30 rq:797262 version:64.1

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/ndctl/ndctl.changes    2020-03-13 
10:56:34.612400528 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.ndctl.new.2738/ndctl.changes  2020-04-30 
18:51:25.204595542 +0200
@@ -1,0 +2,9 @@
+Fri Apr  3 17:48:20 UTC 2020 - Michal Suchanek <[email protected]>
+
+- ndctl/namespace: Skip zero namespaces when processing all namespaces
+  (bsc#1167861, bsc#1165509, ltc#182068).
+  + ndctl-namespace-skip-zero-namespaces-when-processing.patch
+- Refresh patch to upstream version:
+   ndctl-test-Relax-dax_pmem_compat-requirement.patch
+
+-------------------------------------------------------------------

New:
----
  ndctl-namespace-skip-zero-namespaces-when-processing.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ndctl.spec ++++++
--- /var/tmp/diff_new_pack.iIS4J3/_old  2020-04-30 18:51:25.612596411 +0200
+++ /var/tmp/diff_new_pack.iIS4J3/_new  2020-04-30 18:51:25.616596419 +0200
@@ -36,6 +36,7 @@
 Patch6:         %{name}-dimm-Fix-init-labels-success-reporting.patch
 Patch7:         %{name}-namespace-Fix-enable-namespace-error-for-seed-.patch
 Patch8:         %{name}-test-Relax-dax_pmem_compat-requirement.patch
+Patch9:         %{name}-namespace-skip-zero-namespaces-when-processing.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  keyutils-devel

++++++ ndctl-namespace-skip-zero-namespaces-when-processing.patch ++++++
>From ff4e8668a5edd2eaa38f08deb9b357778019e2ea Mon Sep 17 00:00:00 2001
From: Michal Suchanek <[email protected]>
Date: Fri, 3 Apr 2020 19:38:33 +0200
Subject: [PATCH] ndctl/namespace: skip zero namespaces when processing all
 namespaces.

The kernel always creates zero length namespace with uuid 0 in each
region.

When processing all namespaces the user gets confusing errors from ndctl
trying to process this namespace. Skip it.

The user can still specify the namespace by name directly in case
processing it is desirable.

Fixes: #41

Signed-off-by: Michal Suchanek <[email protected]>
---
 ndctl/namespace.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index 0550580707e8..6f4a4b5b8883 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -2128,9 +2128,19 @@ static int do_xaction_namespace(const char *namespace,
                        ndctl_namespace_foreach_safe(region, ndns, _n) {
                                ndns_name = ndctl_namespace_get_devname(ndns);
 
-                               if (strcmp(namespace, "all") != 0
-                                               && strcmp(namespace, ndns_name) 
!= 0)
-                                       continue;
+                               if (strcmp(namespace, "all") == 0) {
+                                       static const uuid_t zero_uuid;
+                                       uuid_t uuid;
+
+                                       ndctl_namespace_get_uuid(ndns, uuid);
+                                       if (!ndctl_namespace_get_size(ndns) &&
+                                           !memcmp(uuid, zero_uuid, 
sizeof(uuid_t)))
+                                               continue;
+                               } else {
+                                       if (strcmp(namespace, ndns_name) != 0)
+                                               continue;
+                               }
+
                                switch (action) {
                                case ACTION_DISABLE:
                                        rc = ndctl_namespace_disable_safe(ndns);
-- 
2.23.0

++++++ ndctl-test-Relax-dax_pmem_compat-requirement.patch ++++++
--- /var/tmp/diff_new_pack.iIS4J3/_old  2020-04-30 18:51:25.700596598 +0200
+++ /var/tmp/diff_new_pack.iIS4J3/_new  2020-04-30 18:51:25.700596598 +0200
@@ -1,15 +1,26 @@
-From 9ba17d4af1db5a6f97e2be991f5113bcedfd019f Mon Sep 17 00:00:00 2001
-From: Jan Kara <[email protected]>
-Date: Tue, 3 Mar 2020 14:42:06 +0100
+From d30418d29bc7b171d6612df7e2bb9f914e954d41 Mon Sep 17 00:00:00 2001
+From: Dan Williams <[email protected]>
+Date: Tue, 3 Mar 2020 14:58:35 -0800
 Subject: [PATCH] ndctl/test: Relax dax_pmem_compat requirement
 
-References: bsc#1159523
+Patch-mainline: v68
+Git-commit: b7991dbc22f31d03a38f3ee2dca4446fb55279e3
+
+While there are some tests that require the new "dax-bus" device model,
+none of the tests require compatibility mode. Drop the requirement so
+the tests work with DEV_DAX_PMEM_COMPAT=n kernels.
+
+Reviewed-by: Jan Kara <[email protected]>
+Cc: Jan Kara <[email protected]>
+Link: http://lore.kernel.org/r/[email protected]
+Link: 
https://lore.kernel.org/r/158327631566.2222444.16879386597302511191.st...@dwillia2-desk3.amr.corp.intel.com
+Signed-off-by: Dan Williams <[email protected]>
 ---
  test/core.c | 8 ++++++++
  1 file changed, 8 insertions(+)
 
 diff --git a/test/core.c b/test/core.c
-index 4b36b2d14d7b..3aed14241846 100644
+index 4b36b2d14d7b..8aae685afc2a 100644
 --- a/test/core.c
 +++ b/test/core.c
 @@ -168,6 +168,14 @@ int nfit_test_init(struct kmod_ctx **ctx, struct 
kmod_module **mod,
@@ -21,7 +32,7 @@
 +               * dax_pmem_compat is not required, missing is ok,
 +               * present-but-production is not ok.
 +               */
-+              if (rc && strstr(name, "dax_pmem_compat"))
++              if (rc && strcmp(name, "dax_pmem_compat") == 0)
 +                      continue;
 +
                if (rc) {


Reply via email to