Fix problem where rebuild of IMSM RAID5 volume started in OROM, does not proceed in OS

Resolves bz956021 (f18), bz956026 (f17), bz956031 (f19)

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
Jes Sorensen 2013-04-24 10:25:43 +02:00
parent adb522038d
commit ec874c830f
2 changed files with 58 additions and 2 deletions

View File

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

View File

@ -1,7 +1,7 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm
Version: 3.2.6
Release: 18%{?dist}
Release: 19%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
Source1: mdmonitor.init
Source2: raid-check
@ -15,6 +15,7 @@ Patch1: mdadm-3.2.6-Create.c-check-if-freesize-is-equal-0.patch
Patch2: mdadm-3.2.6-imsm-Forbid-spanning-between-multiple-controllers.patch
Patch3: mdadm-3.2.6-query-udev-dir-via-pkg-config.patch
Patch4: mdadm-3.2.6-Add-updating-component_size-to-manager-thread-of-mdm.patch
Patch5: mdadm-3.2.6-imsm-monitor-do-not-finish-migration-if-there-are-no.patch
Patch93: mdadm-3.2.6-Remove-offroot-argument-and-default-to-always-settin.patch
Patch94: mdadm-3.2.6-Add-support-for-launching-mdmon-via-systemctl-instea.patch
Patch95: mdadm-3.2.6-In-case-launching-mdmon-fails-print-an-error-message.patch
@ -77,6 +78,7 @@ is not used as the system init process.
%patch2 -p1 -b .multictrl
%patch3 -p1 -b .udevquery
%patch4 -p1 -b .component
%patch5 -p1 -b .migration
# Use systemctl to launch mdmon on F18 and higher
%if !%{fedora17}
@ -168,7 +170,12 @@ rm -rf %{buildroot}
%endif
%changelog
* Wed Apr 23 2013 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.6-18
* Wed Apr 24 2013 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.6-19
- Fix problem where rebuild of IMSM RAID5 volume started in OROM,
does not proceed in OS
- Resolves bz956021 (f18), bz956026 (f17), bz956031 (f19)
* Tue Apr 23 2013 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.6-18
- Fix problem with IMSM metadata where resync progress would be lost
if an array was stopped during ongoing expansion of a RAID1/5 volume.
- Resolves bz948745