summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-01-17 02:44:52 +0100
committerNeilBrown <neilb@suse.de>2011-01-17 02:44:52 +0100
commit2a9f840972baf0819c5a63508a6b24a6f9251c55 (patch)
treea3fbc8bf5cc21de928ffc9c51b2d3200afa40e61 /monitor.c
parentFIX: mdadm throws coredump on exit in error case (diff)
downloadmdadm-2a9f840972baf0819c5a63508a6b24a6f9251c55.tar.xz
mdadm-2a9f840972baf0819c5a63508a6b24a6f9251c55.zip
FIX: sync_completed == 0 causes reshape cancellation in metadata
md signals reshape completion (whole area or parts) by setting sync_completed to 0. This causes in set_array_state() to rollback metadata changes (super-intel.c:4977. To avoid this do not allow for set last_checkpoint to 0 if reshape is finished. This was also root cause of my previous fix for finalization reshape that I agreed earlier is not necessary, Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 1107d477..b7287d8b 100644
--- a/monitor.c
+++ b/monitor.c
@@ -363,8 +363,10 @@ static int read_and_act(struct active_array *a)
/* Reshape has progressed or completed so we need to
* update the array state - and possibly the array size
*/
- a->last_checkpoint = sync_completed;
+ if (sync_completed != 0)
+ a->last_checkpoint = sync_completed;
a->container->ss->set_array_state(a, a->curr_state <= clean);
+ a->last_checkpoint = sync_completed;
}
if (sync_completed > a->last_checkpoint)