]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Raid0: detect reshape on array start
authorAdam Kwolek <adam.kwolek@intel.com>
Thu, 6 Jan 2011 08:27:25 +0000 (19:27 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 6 Jan 2011 08:27:25 +0000 (19:27 +1100)
When raid0 array is takeovered to raid4 for reshape it should be possible to detect
that array for reshape is monitored now for metadata update.

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

index 4efe5da7bf4cc7d28403bbb9fb5ff753ef3533a6..1107d4778b3f623f60e6c0ae0800924ecf2c75d1 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -235,6 +235,13 @@ static int read_and_act(struct active_array *a)
                }
        }
 
+       if (a->curr_state > inactive &&
+           a->prev_state == inactive) {
+               /* array has been started
+                * possible that container operation has to be completed
+                */
+               a->container->ss->set_array_state(a, 0);
+       }
        if (a->curr_state <= inactive &&
            a->prev_state > inactive) {
                /* array has been stopped */