Hello community,

here is the log from the commit of package mdadm for openSUSE:Factory checked 
in at 2018-02-12 10:25:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mdadm (Old)
 and      /work/SRC/openSUSE:Factory/.mdadm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mdadm"

Mon Feb 12 10:25:04 2018 rev:114 rq:575332 version:4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/mdadm/mdadm.changes      2018-01-16 
09:31:34.919982677 +0100
+++ /work/SRC/openSUSE:Factory/.mdadm.new/mdadm.changes 2018-02-12 
10:25:05.992146351 +0100
@@ -1,0 +2,7 @@
+Sat Feb 10 14:34:01 UTC 2018 - col...@suse.com
+
+- policy.c: Avoid to take spare without defined domain by imsm
+  (bsc#1076588)
+  0209-policy.c-Avoid-to-take-spare-without-defined-domain-.patch 
+
+-------------------------------------------------------------------

New:
----
  0209-policy.c-Avoid-to-take-spare-without-defined-domain-.patch

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

Other differences:
------------------
++++++ mdadm.spec ++++++
--- /var/tmp/diff_new_pack.AvryWL/_old  2018-02-12 10:25:09.984002850 +0100
+++ /var/tmp/diff_new_pack.AvryWL/_new  2018-02-12 10:25:09.988002706 +0100
@@ -251,6 +251,7 @@
 Patch206:       0206-imsm-continue-resync-on-3-disk-RAID10.patch
 Patch207:       0207-managemon-Don-t-add-disk-to-the-array-after-it-has-s.patch
 Patch208:       0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch
+Patch209:       0209-policy.c-Avoid-to-take-spare-without-defined-domain-.patch
 
 %define _udevdir %(pkg-config --variable=udevdir udev)
 %define _systemdshutdowndir %{_unitdir}/../system-shutdown
@@ -469,6 +470,7 @@
 %patch206 -p1
 %patch207 -p1
 %patch208 -p1
+%patch209 -p1
 
 %build
 make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes

++++++ 0209-policy.c-Avoid-to-take-spare-without-defined-domain-.patch ++++++
>From 3bf9495270d7cd00da942e183dc5f7c7eb68ff69 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkac...@intel.com>
Date: Thu, 11 Jan 2018 12:39:49 +0100
Subject: [PATCH] policy.c: Avoid to take spare without defined domain by imsm
Git-commit: 3bf9495270d7cd00da942e183dc5f7c7eb68ff69
Patch-mainline: mdadm-4.0+
References: bsc#1076588

Only Imsm get_disk_controller_domain returns disk controller domain for
each disk. It causes that mdadm automatically creates disk controller
domain policy for imsm metadata, and imsm containers in the same disk
controller domain can take spare for recovery.

Ignore spares if only one imsm domain is matched.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkac...@intel.com>
Signed-off-by: Jes Sorensen <jsoren...@fb.com>
Signed-off-by: Coly Li <col...@suse.de>
---
 policy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/policy.c b/policy.c
index b17585a..c0d18a7 100644
--- a/policy.c
+++ b/policy.c
@@ -661,6 +661,7 @@ int domain_test(struct domainlist *dom, struct dev_policy 
*pol,
         *  1:  has domains, all match
         */
        int found_any = -1;
+       int has_one_domain = 1;
        struct dev_policy *p;
 
        pol = pol_find(pol, pol_domain);
@@ -670,6 +671,9 @@ int domain_test(struct domainlist *dom, struct dev_policy 
*pol,
                        dom = dom->next;
                if (!dom || strcmp(dom->dom, p->value) != 0)
                        return 0;
+               if (has_one_domain && metadata && strcmp(metadata, "imsm") == 0)
+                       found_any = -1;
+               has_one_domain = 0;
        }
        return found_any;
 }
-- 
2.16.1


Reply via email to