]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: FIX: Disable automatic metadata rollback for broken reshape
authorAdam Kwolek <adam.kwolek@intel.com>
Tue, 14 Jun 2011 02:42:16 +0000 (12:42 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 14 Jun 2011 02:42:16 +0000 (12:42 +1000)
mdmon cannot rollback metadata changes automatically.
It can break reshape process in the way that in case of reshape break
user will not be able to deal with broken reshape due to lack of information
about reshape geometry.

mdadm (process that invokes reshape) doesn't make any rollback to allow
for user action. mdmon should not do this either unless it knows for sure
it is save. such knowledge is not available for automatic rollback.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index 4f674bf74cd9a44eb4aa96c9c4b8bf55df9a6ac5..d8464b7654d4e37029dd3a81252ee050a1bf4924 100644 (file)
@@ -5856,14 +5856,18 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
                } else {
                        if (a->last_checkpoint == 0 && a->prev_action == reshape) {
                                /* for some reason we aborted the reshape.
-                                * Better clean up
+                                *
+                                * disable automatic metadata rollback
+                                * user action is required to recover process
                                 */
+                               if (0) {
                                struct imsm_map *map2 = get_imsm_map(dev, 1);
                                dev->vol.migr_state = 0;
                                dev->vol.migr_type = 0;
                                dev->vol.curr_migr_unit = 0;
                                memcpy(map, map2, sizeof_imsm_map(map2));
                                super->updates_pending++;
+                               }
                        }
                        if (a->last_checkpoint >= a->info.component_size) {
                                unsigned long long array_blocks;