Hello community,

here is the log from the commit of package ndctl for openSUSE:Factory checked 
in at 2020-09-05 23:58:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ndctl (Old)
 and      /work/SRC/openSUSE:Factory/.ndctl.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ndctl"

Sat Sep  5 23:58:27 2020 rev:30 rq:831444 version:69

Changes:
--------
--- /work/SRC/openSUSE:Factory/ndctl/ndctl.changes      2020-08-23 
09:19:05.510615719 +0200
+++ /work/SRC/openSUSE:Factory/.ndctl.new.3399/ndctl.changes    2020-09-05 
23:59:06.423154829 +0200
@@ -1,0 +2,6 @@
+Fri Aug 28 08:27:10 UTC 2020 - Michal Suchanek <[email protected]>
+
+- Suppress ENXIO when processing all namespaces (jsc#SLE-13321, bsc#1175851, 
ltc#187867).
+  + ndctl-namespace-Suppress-ENXIO-when-processing-all-n.patch
+
+-------------------------------------------------------------------
@@ -4 +10,2 @@
-- Update to v69 (jsc#SLE-13824, jsc#SLE-12770, jsc#SLE-15065):
+- Update to v69 (jsc#SLE-13824, jsc#SLE-12770, jsc#SLE-15065, jsc#SLE-15484,
+                jsc#SLE-15485, bsc#1175052, ltc#186863, bsc#1174969, 
ltc#185845):

New:
----
  ndctl-namespace-Suppress-ENXIO-when-processing-all-n.patch

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

Other differences:
------------------
++++++ ndctl.spec ++++++
--- /var/tmp/diff_new_pack.JPtvLb/_old  2020-09-05 23:59:09.039156139 +0200
+++ /var/tmp/diff_new_pack.JPtvLb/_new  2020-09-05 23:59:09.039156139 +0200
@@ -28,6 +28,7 @@
 URL:            https://github.com/pmem/ndctl
 Source0:        
https://github.com/pmem/ndctl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Patch9:         %{name}-namespace-skip-zero-namespaces-when-processing.patch
+Patch13:        %{name}-namespace-Suppress-ENXIO-when-processing-all-n.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  keyutils-devel

++++++ ndctl-namespace-Suppress-ENXIO-when-processing-all-n.patch ++++++
>From 6a678667c6279369dda999da8535e327df036705 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <[email protected]>
Date: Thu, 23 Jul 2020 19:16:59 +0200
Subject: [PATCH] ndctl/namespace: Suppress -ENXIO when processing all
 namespaces.

Upstream: submitted https://patchwork.kernel.org/patch/11681431/

When processing all namespaces and no namespaces exist user gets the
default -ENXIO. Set default rc to 0 when processing all namespaces.
This avoids confusing error message printed in addition to the message
saying 0 namespaces were affected.

Before:

 # ndctl check-namespace all
namespace0.0: namespace_check: namespace0.0: check aborted, namespace online
error checking namespaces: Device or resource busy
checked 0 namespaces
 # ndctl disable-namespace all
disabled 1 namespace
 # ndctl check-namespace all
namespace0.0: namespace_check: Unable to recover any BTT info blocks
error checking namespaces: No such device or address
checked 0 namespaces
 # ndctl destroy-namespace all
destroyed 1 namespace
 # ndctl check-namespace all
error checking namespaces: No such device or address
checked 0 namespaces
 # ndctl destroy-namespace all
error destroying namespaces: No such device or address
destroyed 0 namespaces

After:

 # ndctl check-namespace all
namespace0.0: namespace_check: namespace0.0: check aborted, namespace online
error checking namespaces: Device or resource busy
checked 0 namespaces
 # ndctl disable-namespace namespace0.0
disabled 1 namespace
 # ndctl check-namespace all
namespace0.0: namespace_check: Unable to recover any BTT info blocks
error checking namespaces: No such device or address
checked 0 namespaces
 # ndctl destroy-namespace all
destroyed 1 namespace
 # ndctl check-namespace all
checked 0 namespaces
 # ndctl destroy-namespace all
destroyed 0 namespaces
 # ndctl destroy-namespace all
destroyed 0 namespaces

Note: this does change the return value from -ENXIO to 0 in the cases
when no namespaces exist and processing all namespaces was requested.

Signed-off-by: Michal Suchanek <[email protected]>
Reviewed-by: Santosh S <[email protected]>
---
v2: fix the error code references in the commit message
---
 ndctl/namespace.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index 3fabe4799d75..835f4076008a 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -2112,6 +2112,9 @@ static int do_xaction_namespace(const char *namespace,
        if (!namespace && action != ACTION_CREATE)
                return rc;
 
+       if (namespace && (strcmp(namespace, "all") == 0))
+               rc = 0;
+
        if (verbose)
                ndctl_set_log_priority(ctx, LOG_DEBUG);
 
-- 
2.28.0

++++++ ndctl-namespace-skip-zero-namespaces-when-processing.patch ++++++
--- /var/tmp/diff_new_pack.JPtvLb/_old  2020-09-05 23:59:09.087156162 +0200
+++ /var/tmp/diff_new_pack.JPtvLb/_new  2020-09-05 23:59:09.091156165 +0200
@@ -4,6 +4,8 @@
 Subject: [PATCH] ndctl/namespace: skip zero namespaces when processing all
  namespaces.
 
+Upstream: submitted https://patchwork.kernel.org/patch/11681433/
+
 The kernel always creates zero length namespace with uuid 0 in each
 region.
 
@@ -14,17 +16,18 @@
 processing it is desirable.
 
 Fixes: #41
-
+Reviewed-by: Santosh S <[email protected]>
+Tested-by: Harish Sriram <[email protected]>
 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
+index e734248c9752..3fabe4799d75 100644
 --- a/ndctl/namespace.c
 +++ b/ndctl/namespace.c
-@@ -2128,9 +2128,19 @@ static int do_xaction_namespace(const char *namespace,
+@@ -2171,9 +2171,19 @@ static int do_xaction_namespace(const char *namespace,
                        ndctl_namespace_foreach_safe(region, ndns, _n) {
                                ndns_name = ndctl_namespace_get_devname(ndns);
  
@@ -48,5 +51,5 @@
                                case ACTION_DISABLE:
                                        rc = ndctl_namespace_disable_safe(ndns);
 -- 
-2.23.0
+2.28.0
 


Reply via email to