SHA256
1
0
forked from pool/mdadm
mdadm/0003-Assemble-change-load_devices-to-return-most_recent-s.patch
Neil Brown ceac01b560 - 0001-DDF-mark-missing-on-assembly-device-properly.patch
- 0002-DDF-guard-against-pdnum-being-negative.patch
- 0003-DDF-fix-possible-mdmon-crash-when-updating-metadata.patch
- 0004-DDF-Don-t-fail-compare_super_ddf-due-to-re-configure.patch
  More upstream DDF fixes (bnc#866660)

- 0001-mdmon-.service-Change-type-of-process-start-up-to-fo.patch
- 0003-Work-around-architectures-having-statfs.f_type-defin.patch
- 0004-DDF-report-seq-counter-as-events.patch
- 0005-DDF-when-first-activating-an-array-record-any-missin.patch
  Two fixes for DDF (bnc#866660) and a couple of other upstream fixes
  just for good measure.

- 0001-Assemble-allow-load_devices-to-change-the-st-which-i.patch
  0002-Assemble-re-arrange-freeing-of-tst-in-load_devices.patch
  0003-Assemble-change-load_devices-to-return-most_recent-s.patch
  Allow RAID5 to be assembled even when firs device listed recently
  failed (bnc#865221)

OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=105
2014-04-02 06:19:16 +00:00

37 lines
988 B
Diff

From 56bbc588f7f0f3bdd3ec23f02109b427c1d3b8f1 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
Date: Tue, 25 Feb 2014 15:04:16 +1100
Subject: [PATCH 3/3] Assemble: change load_devices to return most_recent 'st'
value.
This means that
st->ss->getinfo_super(st, content, NULL);
clean = content->array.state & 1;
will get an up-to-date value for 'clean'. This fix allows
tests/03r5assem-failed
to work.
Signed-off-by: NeilBrown <neilb@suse.de>
---
Assemble.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- mdadm-3.3.orig/Assemble.c
+++ mdadm-3.3/Assemble.c
@@ -703,8 +703,12 @@ static int load_devices(struct devs *dev
if (devices[devcnt].i.disk.state == 6) {
if (most_recent < 0 ||
devices[devcnt].i.events
- > devices[most_recent].i.events)
+ > devices[most_recent].i.events) {
+ struct supertype *tmp = tst;
+ tst = st;
+ st = tmp;
most_recent = devcnt;
+ }
}
tst->ss->free_super(tst);
free(tst);