|
|
373056 |
From 79b68f1b48b0967da999945e310aef628c9bca4c Mon Sep 17 00:00:00 2001
|
|
|
373056 |
From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
|
|
|
373056 |
Date: Thu, 18 Apr 2013 10:51:37 +0200
|
|
|
373056 |
Subject: [PATCH] imsm: monitor: do not finish migration if there are no failed
|
|
|
373056 |
disks
|
|
|
373056 |
|
|
|
373056 |
Transition from "degraded" to "recovery" made in OROM is slightly different
|
|
|
373056 |
than the same transision in mdadm. Missing disk is not removed from list of
|
|
|
373056 |
raid devices, but just from map. Therefore mdadm should not end migration
|
|
|
373056 |
basing on existence of list of missing disks but should rely on count of
|
|
|
373056 |
failed disks.
|
|
|
373056 |
|
|
|
373056 |
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
|
|
|
373056 |
Tested-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
|
|
|
373056 |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
373056 |
---
|
|
|
373056 |
super-intel.c | 9 ++++++++-
|
|
|
373056 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
373056 |
|
|
|
373056 |
diff --git a/super-intel.c b/super-intel.c
|
|
|
373056 |
index 24016b7..3f15b0f 100644
|
|
|
373056 |
--- a/super-intel.c
|
|
|
373056 |
+++ b/super-intel.c
|
|
|
373056 |
@@ -6886,6 +6886,12 @@ static void handle_missing(struct intel_super *super, struct imsm_dev *dev)
|
|
|
373056 |
if (!super->missing)
|
|
|
373056 |
return;
|
|
|
373056 |
|
|
|
373056 |
+ /* When orom adds replacement for missing disk it does
|
|
|
373056 |
+ * not remove entry of missing disk, but just updates map with
|
|
|
373056 |
+ * new added disk. So it is not enough just to test if there is
|
|
|
373056 |
+ * any missing disk, we have to look if there are any failed disks
|
|
|
373056 |
+ * in map to stop migration */
|
|
|
373056 |
+
|
|
|
373056 |
dprintf("imsm: mark missing\n");
|
|
|
373056 |
/* end process for initialization and rebuild only
|
|
|
373056 |
*/
|
|
|
373056 |
@@ -6896,7 +6902,8 @@ static void handle_missing(struct intel_super *super, struct imsm_dev *dev)
|
|
|
373056 |
failed = imsm_count_failed(super, dev, MAP_0);
|
|
|
373056 |
map_state = imsm_check_degraded(super, dev, failed, MAP_0);
|
|
|
373056 |
|
|
|
373056 |
- end_migration(dev, super, map_state);
|
|
|
373056 |
+ if (failed)
|
|
|
373056 |
+ end_migration(dev, super, map_state);
|
|
|
373056 |
}
|
|
|
373056 |
for (dl = super->missing; dl; dl = dl->next)
|
|
|
373056 |
mark_missing(dev, &dl->disk, dl->index);
|
|
|
373056 |
--
|
|
|
373056 |
1.8.1.4
|
|
|
373056 |
|