[mdadm/f15: 2/3] Backport proper upstream version of fix for IMSM RAID assembly problem, which resolves issues when b
Jes Sorensen
jsorensen at fedoraproject.org
Sat Oct 22 15:01:25 UTC 2011
commit 3010f9bec6cc9b493f543ddb9ba3e5d38b3b33a2
Author: Jes Sorensen <Jes.Sorensen at redhat.com>
Date: Sat Oct 22 10:58:41 2011 +0200
Backport proper upstream version of fix for IMSM RAID assembly problem,
which resolves issues when booting off sysvinit based system.
Resolves: bz736387 (Fedora 15) bz744217 (Fedora 16)
Signed-off-by: Jes Sorensen <Jes.Sorensen at redhat.com>
...emove-race-for-starting-container-devices.patch | 47 ++++++++++++--------
mdadm.spec | 7 +++-
2 files changed, 34 insertions(+), 20 deletions(-)
---
diff --git a/mdadm-3.2.2-Remove-race-for-starting-container-devices.patch b/mdadm-3.2.2-Remove-race-for-starting-container-devices.patch
index 9a767b0..dffffeb 100644
--- a/mdadm-3.2.2-Remove-race-for-starting-container-devices.patch
+++ b/mdadm-3.2.2-Remove-race-for-starting-container-devices.patch
@@ -1,14 +1,21 @@
-From 50177a4bbed446087dd2529b5518697f2f69de08 Mon Sep 17 00:00:00 2001
-From: Jes Sorensen <Jes.Sorensen at redhat.com>
-Date: Thu, 13 Oct 2011 19:35:07 +0200
-Subject: [PATCH 1/3] Remove race for starting container devices.
+commit 5fc8cff3a4177dfbab594947283117620b4b8c9c
+Author: Jes Sorensen <Jes.Sorensen at redhat.com>
+Date: Sat Oct 22 11:29:47 2011 +1100
-This moves the lock handling out of Incremental_container() and relies
-on the caller holding the lock. This prevents conflict with a
-follow-on mdadm comment which may try and launch the device in
-parallel.
+ Remove race for starting container devices.
+
+ This moves the lock handling out of Incremental_container() and relies
+ on the caller holding the lock. This prevents conflict with a
+ follow-on mdadm comment which may try and launch the device in
+ parallel.
+
+ This involves replacing a call to "Incremental" with an
+ unrolled version with just the case that calls Incremental_container
+ and so needs a call to ->load_container.
+
+ Signed-off-by: Jes Sorensen <Jes.Sorensen at redhat.com>
+ Signed-off-by: NeilBrown <neilb at suse.de>
-Signed-off-by: Jes Sorensen <Jes.Sorensen at redhat.com>
---
Incremental.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
@@ -17,7 +24,7 @@ diff --git a/Incremental.c b/Incremental.c
index 14184da..9fa6800 100644
--- a/Incremental.c
+++ b/Incremental.c
-@@ -138,9 +138,15 @@ int Incremental(char *devname, int verbose, int runstop,
+@@ -138,9 +138,15 @@
rv = st->ss->load_container(st, dfd, NULL);
close(dfd);
@@ -36,7 +43,7 @@ index 14184da..9fa6800 100644
fprintf(stderr, Name ": %s is not part of an md array.\n",
devname);
-@@ -440,7 +446,6 @@ int Incremental(char *devname, int verbose, int runstop,
+@@ -438,7 +444,6 @@
if (info.array.level == LEVEL_CONTAINER) {
int devnum = devnum; /* defined and used iff ->external */
/* Try to assemble within the container */
@@ -44,19 +51,24 @@ index 14184da..9fa6800 100644
sysfs_uevent(&info, "change");
if (verbose >= 0)
fprintf(stderr, Name
-@@ -451,8 +456,9 @@ int Incremental(char *devname, int verbose, int runstop,
+@@ -447,10 +452,14 @@
+ wait_for(chosen_name, mdfd);
+ if (st->ss->external)
devnum = fd2devnum(mdfd);
++ if (st->ss->load_container)
++ rv = st->ss->load_container(st, mdfd, NULL);
close(mdfd);
sysfs_free(sra);
- rv = Incremental(chosen_name, verbose, runstop,
- NULL, homehost, require_homehost, autof);
-+ rv = Incremental_container(st, chosen_name, homehost,
-+ verbose, runstop, autof);
++ if (!rv)
++ rv = Incremental_container(st, chosen_name, homehost,
++ verbose, runstop, autof);
+ map_unlock(&map);
if (rv == 1)
/* Don't fail the whole -I if a subarray didn't
* have enough devices to start yet
-@@ -1462,9 +1468,6 @@ static int Incremental_container(struct supertype *st, char *devname,
+@@ -1460,9 +1469,6 @@
trustworthy = FOREIGN;
list = st->ss->container_content(st, NULL);
@@ -66,7 +78,7 @@ index 14184da..9fa6800 100644
/* do not assemble arrays that might have bad blocks */
if (list->array.state & (1<<MD_SB_BBM_ERRORS)) {
fprintf(stderr, Name ": BBM log found in metadata. "
-@@ -1602,7 +1605,6 @@ static int Incremental_container(struct supertype *st, char *devname,
+@@ -1600,7 +1606,6 @@
close(sfd);
}
domain_free(domains);
@@ -74,6 +86,3 @@ index 14184da..9fa6800 100644
return 0;
}
---
-1.7.6.4
-
diff --git a/mdadm.spec b/mdadm.spec
index 2b4cc68..a3f02d0 100644
--- a/mdadm.spec
+++ b/mdadm.spec
@@ -1,7 +1,7 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm
Version: 3.2.2
-Release: 11%{?dist}
+Release: 12%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
Source1: mdmonitor.init
Source2: raid-check
@@ -139,6 +139,11 @@ fi
%{_initrddir}/*
%changelog
+* Sat Oct 22 2011 Jes Sorensen <Jes.Sorensen at redhat.com> - 3.2.2-12
+- Backport upstream version of fix for IMSM RAID assembly problem,
+ which resolves issues when booting off sysvinit based system.
+- Resolves: bz736387 (Fedora 15) bz744217 (Fedora 16)
+
* Wed Oct 19 2011 Jes Sorensen <Jes.Sorensen at redhat.com> - 3.2.2-11
- Fix systemd dependency problem
- Resolves: bz741115 (F16) bz744226 (rawhide)
More information about the scm-commits
mailing list