summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2012-02-09 12:36:42 +1100
committerNeilBrown <neilb@suse.de>2012-02-09 12:36:42 +1100
commit6a75c8ca79b4cf89a5d1ac24b484b75e8a7e9fb4 (patch)
treef2feeff001de4b630f7af02ccc97d70662684d3a
parentf93346ef078fde20e46849901efa16dd1b05ec33 (diff)
downloadmdadm-6a75c8ca79b4cf89a5d1ac24b484b75e8a7e9fb4.tar.gz
imsm: FIX: use md position to reshape restart
When reshape is broken it can occur that metadata is not saved properly. This can cause that reshape process is farther in md than metadata states. On restart save checkpoint to store current position /probably farther/ that can be read from md. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super-intel.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c
index f5762d8..5f451f3 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -10067,6 +10067,18 @@ static int imsm_manage_reshape(
"are present in copy area.\n");
goto abort;
}
+ /* Save checkpoint to update migration record for current
+ * reshape position (in md). It can be farther than current
+ * reshape position in metadata.
+ */
+ if (save_checkpoint_imsm(st, sra, UNIT_SRC_NORMAL) == 1) {
+ /* ignore error == 2, this can mean end of reshape here
+ */
+ dprintf("imsm: Cannot write checkpoint to "
+ "migration record (UNIT_SRC_NORMAL, "
+ "initial save)\n");
+ goto abort;
+ }
}
/* size for data */