]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: FIX: No new missing disks are allowed during general migration
authorAdam Kwolek <adam.kwolek@intel.com>
Tue, 7 Feb 2012 14:03:11 +0000 (15:03 +0100)
committerNeilBrown <neilb@suse.de>
Thu, 9 Feb 2012 01:20:51 +0000 (12:20 +1100)
When during incremental assembly general migration is in progress,
starting degraded array causes that no more disks (even present)
can be added later as array is already started.

Request all previously present disks during general migration for assembly.

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

index eba11d618621055fa4954cbe946b4c6cab5dee35..17034bbd3edf93bd3a9fe8dcf7ef6173beb98f18 100644 (file)
@@ -2683,7 +2683,17 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *
                        enough = 0;
                else /* we're normal, or already degraded */
                        enough = 1;
                        enough = 0;
                else /* we're normal, or already degraded */
                        enough = 1;
-
+               if (is_gen_migration(dev) && missing) {
+                       /* during general migration we need all disks
+                        * that process is running on.
+                        * No new missing disk is allowed.
+                        */
+                       max_enough = -1;
+                       enough = -1;
+                       /* no more checks necessary
+                        */
+                       break;
+               }
                /* in the missing/failed disk case check to see
                 * if at least one array is runnable
                 */
                /* in the missing/failed disk case check to see
                 * if at least one array is runnable
                 */