From 5e9fd96f213e79c8d8996bfbe90488a2f09e4d19 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 31 Oct 2012 17:02:49 +1100 Subject: [PATCH] Assemble: Fix critical-section-recovery when assembling a growing array. commit aacb2f816afbddf56c406039b8e2e6c0dbc8a8a0 Assemble: add support for replacement devices. broke the restoring of the 'critical section' because it messed up the list of file descriptors passed to Grow_restart. Put it back the way it should be. Signed-off-by: NeilBrown --- Assemble.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assemble.c b/Assemble.c index dbac9ae..0e51fa4 100644 --- a/Assemble.c +++ b/Assemble.c @@ -1595,8 +1595,8 @@ try_again: pr_err(":%s has an active reshape - checking " "if critical section needs to be restored\n", chosen_name); - for (i=0; i= 0) { fdlist[i] = dev_open(devices[j].devname, devices[j].included @@ -1614,7 +1614,7 @@ try_again: if (st->ss->external && st->ss->recover_backup) err = st->ss->recover_backup(st, content); else - err = Grow_restart(st, content, fdlist, bestcnt, + err = Grow_restart(st, content, fdlist, bestcnt/2, c->backup_file, c->verbose > 0); if (err && c->invalid_backup) { if (c->verbose > 0)