diff options
author | Adam Kwolek <adam.kwolek@intel.com> | 2012-02-09 12:37:40 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-02-09 12:37:40 +1100 |
commit | e1dd332a09c66ef0df68229cc633b8f2521e5db4 (patch) | |
tree | 9ad5fd5335c8a426a273e5ec1309ffe775171550 /Grow.c | |
parent | 51d83f5d119f9b727cc715b22b1625332bd0130b (diff) |
FIX: restart reshape when reshape process is stopped just between 2 reshapes
When reshape is restarted from '0', very begin of array
it is possible that for external metadata reshape and array
configuration doesn't happen.
Check if md has the same opinion, and reshape is restarted
from 0. If so, this is regular reshape start after reshape
switch in metadata to next array only.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1980,6 +1980,18 @@ static int reshape_array(char *container, int fd, char *devname, goto release; } + if (st->ss->external && restart && (info->reshape_progress == 0)) { + /* When reshape is restarted from '0', very begin of array + * it is possible that for external metadata reshape and array + * configuration doesn't happen. + * Check if md has the same opinion, and reshape is restarted + * from 0. If so, this is regular reshape start after reshape + * switch in metadata to next array only. + */ + if ((verify_reshape_position(info, reshape.level) >= 0) && + (info->reshape_progress == 0)) + restart = 0; + } if (restart) { /* reshape already started. just skip to monitoring the reshape */ if (reshape.backup_blocks == 0) |