SHA256
1
0
forked from pool/mdadm
mdadm/Assemble-avoid-infinite-loop-when-auto-assembling-pa.patch
Neil Brown 702c57405a - mdmonitor
run "mdadm --monitor" from systemd instead of init.d
  sciprt (bnc#849523)
- remove mdadmd due to above.
- udev-rules-try-mdadm-I-on-change-events.patch
  (bnc#851993)
- policy-NULL-path-isn-t-really-acceptable-use-the-dev.patch
- DDF-really-ignore-DDF-metadata-on-partitions.patch
- Assemble-avoid-infinite-loop-when-auto-assembling-pa.patch
- DDF-fix-detection-of-failed-devices-during-assembly.patch
- Grow-fix-problems-with-prematurely-aborting-of-resha.patch
- IMSM-don-t-crash-when-creating-an-array-with-missing.patch
- mdmon-don-t-complain-about-notifying-parent-when-the.patch
- systemd-mdmon-set-IMSM_NO_PLATFORM-1.patch
- mdmon-.service-remove-over-ride-of-Standard-IO.patch
  Various upstream bug fixes.

OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=101
2014-01-22 04:59:00 +00:00

35 lines
1.1 KiB
Diff

From 284546ef89168c9003da192a177cae774199f889 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
Date: Mon, 20 Jan 2014 15:23:31 +1100
Subject: [PATCH 07/13] Assemble: avoid infinite loop when auto-assembling
partial container.
When auto-assembling we loop until we get no successes.
If a device is found that look like it is part of an already-existing
container, but we subsequently fail to add that device, then the fact
that the container is running looks like a success. This can result
in infinite looping.
So if a container was already partially assemble, and is still only
partially assembled after we try to add devices, then don't treat that
as success.
Signed-off-by: NeilBrown <neilb@suse.de>
---
Assemble.c | 4 ++++
1 file changed, 4 insertions(+)
--- mdadm-3.3.orig/Assemble.c
+++ mdadm-3.3/Assemble.c
@@ -990,6 +990,10 @@ static int start_array(int mdfd,
}
st->ss->free_super(st);
sysfs_uevent(content, "change");
+ if (err_ok && okcnt < (unsigned)content->array.raid_disks)
+ /* Was partial, is still partial, so signal an error
+ * to ensure we don't retry */
+ return 1;
return 0;
}