forked from pool/mdadm
ceac01b560
- 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
57 lines
2.1 KiB
Diff
57 lines
2.1 KiB
Diff
From eba2859f50bc0de6da7938a9ec6cfe4ceef43874 Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Wed, 26 Mar 2014 14:19:43 +1100
|
|
Subject: [PATCH 4/6] DDF: report seq counter as events.
|
|
|
|
Also don't treat two devices with different seq numbers as completely
|
|
unrelated.
|
|
|
|
This allows split-brain detection to work properly for ddf.
|
|
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
---
|
|
super-ddf.c | 11 ++++-------
|
|
1 file changed, 4 insertions(+), 7 deletions(-)
|
|
|
|
--- mdadm-3.3.orig/super-ddf.c
|
|
+++ mdadm-3.3/super-ddf.c
|
|
@@ -1929,6 +1929,8 @@ static void getinfo_super_ddf(struct sup
|
|
info->disk.state = (1 << MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE);
|
|
else
|
|
info->disk.state = 1 << MD_DISK_FAULTY;
|
|
+
|
|
+ info->events = be32_to_cpu(ddf->active->seq);
|
|
} else {
|
|
info->disk.number = -1;
|
|
info->disk.raid_disk = -1;
|
|
@@ -2029,6 +2031,7 @@ static void getinfo_super_ddf_bvd(struct
|
|
(be16_to_cpu(ddf->phys->entries[info->disk.number].state) & DDF_Online) &&
|
|
!(be16_to_cpu(ddf->phys->entries[info->disk.number].state) & DDF_Failed))
|
|
info->disk.state = (1<<MD_DISK_SYNC)|(1<<MD_DISK_ACTIVE);
|
|
+ info->events = be32_to_cpu(ddf->active->seq);
|
|
}
|
|
|
|
info->container_member = ddf->currentconf->vcnum;
|
|
@@ -3841,7 +3844,7 @@ static struct mdinfo *container_content_
|
|
dev->disk.state = (1<<MD_DISK_SYNC)|(1<<MD_DISK_ACTIVE);
|
|
dev->recovery_start = MaxSector;
|
|
|
|
- dev->events = be32_to_cpu(ddf->primary.seq);
|
|
+ dev->events = be32_to_cpu(ddf->active->seq);
|
|
dev->data_offset =
|
|
be64_to_cpu(LBA_OFFSET(ddf, bvd)[iphys]);
|
|
dev->component_size = be64_to_cpu(bvd->blocks);
|
|
@@ -3928,12 +3931,6 @@ static int compare_super_ddf(struct supe
|
|
if (memcmp(first->anchor.guid, second->anchor.guid, DDF_GUID_LEN) != 0)
|
|
return 2;
|
|
|
|
- if (!be32_eq(first->active->seq, second->active->seq)) {
|
|
- dprintf("%s: sequence number mismatch %u<->%u\n", __func__,
|
|
- be32_to_cpu(first->active->seq),
|
|
- be32_to_cpu(second->active->seq));
|
|
- return 3;
|
|
- }
|
|
if (first->max_part != second->max_part ||
|
|
!be16_eq(first->phys->used_pdes, second->phys->used_pdes) ||
|
|
!be16_eq(first->virt->populated_vdes,
|