From d4a472a2c8e29a2dd5f0aa5ac673556c802b3ae3 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 17 2017 15:26:51 +0000 Subject: import mdadm-3.4-14.el7_3.1 --- diff --git a/SOURCES/mdadm-3.4-monitor-Make-sure-that-last_checkpoint-is-set-to-0-a.patch b/SOURCES/mdadm-3.4-monitor-Make-sure-that-last_checkpoint-is-set-to-0-a.patch new file mode 100644 index 0000000..4199a1c --- /dev/null +++ b/SOURCES/mdadm-3.4-monitor-Make-sure-that-last_checkpoint-is-set-to-0-a.patch @@ -0,0 +1,40 @@ +From 955aa6cf75a5f8a6def83189a839c5b75d5ecff9 Mon Sep 17 00:00:00 2001 +From: Pawel Baldysiak +Date: Thu, 16 Jun 2016 11:12:20 +0200 +Subject: [PATCH] monitor: Make sure that last_checkpoint is set to 0 after + sync + +In a case of successful completion of a resync (in the last step) +- read_and_act sometimes still reads sync_action as "resync" +but sync_completed already is set to component_size. +When this race occurs, sync operation is +marked as finished, but last_checkpoint is +overwritten with sync_completed. It will cause next +sync operation (ie. reshape) to be reported as complete immediately +after start - mdmon will write successful completion of the reshape +to metadata. This patch sets last_checkpoint to 0 once the sync +is completed to stop it happening. + +Signed-off-by: Pawel Baldysiak +Signed-off-by: Jes Sorensen +--- + monitor.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/monitor.c b/monitor.c +index 870cc1a..4c79ce2 100644 +--- a/monitor.c ++++ b/monitor.c +@@ -420,6 +420,9 @@ static int read_and_act(struct active_array *a) + if (sync_completed > a->last_checkpoint) + a->last_checkpoint = sync_completed; + ++ if (sync_completed >= a->info.component_size) ++ a->last_checkpoint = 0; ++ + a->container->ss->sync_metadata(a->container); + dprintf("(%d): state:%s action:%s next(", a->info.container_member, + array_states[a->curr_state], sync_actions[a->curr_action]); +-- +2.7.4 + diff --git a/SPECS/mdadm.spec b/SPECS/mdadm.spec index 4f15c39..cc14a91 100644 --- a/SPECS/mdadm.spec +++ b/SPECS/mdadm.spec @@ -1,7 +1,7 @@ Summary: The mdadm program controls Linux md devices (software RAID arrays) Name: mdadm Version: 3.4 -Release: 14%{?dist} +Release: 14%{?dist}.1 Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz Source1: mdmonitor.init Source2: raid-check @@ -24,6 +24,7 @@ Patch9: mdadm-3.4-check-reshape_active-more-times-before-Grow_continue.patc Patch10: mdadm-3.4-Use-dev_t-for-devnm2devid-and-devid2devnm.patch Patch11: mdadm-3.4-Change-behavior-in-find_free_devnm-when-wrapping-aro.patch Patch12: mdadm-3.4-mdopen-Prevent-overrunning-the-devname-buffer-when-c.patch +Patch13: mdadm-3.4-monitor-Make-sure-that-last_checkpoint-is-set-to-0-a.patch Patch95: mdadm-3.4-udev-race.patch Patch96: mdadm-3.3.2-skip-rules.patch Patch97: mdadm-3.3-udev.patch @@ -66,6 +67,7 @@ file can be used to help with some common tasks. %patch10 -p1 -b .devt %patch11 -p1 -b .wrap %patch12 -p1 -b .overrun +%patch13 -p1 -b .monitorresync # RHEL customization patches %patch95 -p1 -b .race @@ -134,6 +136,11 @@ rm -rf %{buildroot} /etc/libreport/events.d/* %changelog +* Fri Dec 9 2016 Jes Sorensen - 3.4-14.1 +- Resolve case where a reshape could hang if started right after the + completion of a resync. z-stream fix +- Resolves rhbz#1402434 + * Tue Sep 27 2016 Jes Sorensen - 3.4-14 - The fix for 1331709 caused a problem with container arrays (IMSM) as these can show up with a valid size of 0. Work around this to only