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>
This commit is contained in:
Adam Kwolek 2012-02-09 12:36:42 +11:00 committed by NeilBrown
parent f93346ef07
commit 6a75c8ca79
1 changed files with 12 additions and 0 deletions

View File

@ -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 */