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@redhat.com>
This commit is contained in:
parent
2e29e0e588
commit
3010f9bec6
@ -1,14 +1,21 @@
|
|||||||
From 50177a4bbed446087dd2529b5518697f2f69de08 Mon Sep 17 00:00:00 2001
|
commit 5fc8cff3a4177dfbab594947283117620b4b8c9c
|
||||||
From: Jes Sorensen <Jes.Sorensen@redhat.com>
|
Author: Jes Sorensen <Jes.Sorensen@redhat.com>
|
||||||
Date: Thu, 13 Oct 2011 19:35:07 +0200
|
Date: Sat Oct 22 11:29:47 2011 +1100
|
||||||
Subject: [PATCH 1/3] Remove race for starting container devices.
|
|
||||||
|
Remove race for starting container devices.
|
||||||
|
|
||||||
This moves the lock handling out of Incremental_container() and relies
|
This moves the lock handling out of Incremental_container() and relies
|
||||||
on the caller holding the lock. This prevents conflict with a
|
on the caller holding the lock. This prevents conflict with a
|
||||||
follow-on mdadm comment which may try and launch the device in
|
follow-on mdadm comment which may try and launch the device in
|
||||||
parallel.
|
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@redhat.com>
|
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
|
||||||
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||||
|
|
||||||
---
|
---
|
||||||
Incremental.c | 22 ++++++++++++----------
|
Incremental.c | 22 ++++++++++++----------
|
||||||
1 files changed, 12 insertions(+), 10 deletions(-)
|
1 files changed, 12 insertions(+), 10 deletions(-)
|
||||||
@ -17,7 +24,7 @@ diff --git a/Incremental.c b/Incremental.c
|
|||||||
index 14184da..9fa6800 100644
|
index 14184da..9fa6800 100644
|
||||||
--- a/Incremental.c
|
--- a/Incremental.c
|
||||||
+++ b/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);
|
rv = st->ss->load_container(st, dfd, NULL);
|
||||||
|
|
||||||
close(dfd);
|
close(dfd);
|
||||||
@ -36,7 +43,7 @@ index 14184da..9fa6800 100644
|
|||||||
|
|
||||||
fprintf(stderr, Name ": %s is not part of an md array.\n",
|
fprintf(stderr, Name ": %s is not part of an md array.\n",
|
||||||
devname);
|
devname);
|
||||||
@@ -440,7 +446,6 @@ int Incremental(char *devname, int verbose, int runstop,
|
@@ -438,7 +444,6 @@
|
||||||
if (info.array.level == LEVEL_CONTAINER) {
|
if (info.array.level == LEVEL_CONTAINER) {
|
||||||
int devnum = devnum; /* defined and used iff ->external */
|
int devnum = devnum; /* defined and used iff ->external */
|
||||||
/* Try to assemble within the container */
|
/* Try to assemble within the container */
|
||||||
@ -44,19 +51,24 @@ index 14184da..9fa6800 100644
|
|||||||
sysfs_uevent(&info, "change");
|
sysfs_uevent(&info, "change");
|
||||||
if (verbose >= 0)
|
if (verbose >= 0)
|
||||||
fprintf(stderr, Name
|
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);
|
devnum = fd2devnum(mdfd);
|
||||||
|
+ if (st->ss->load_container)
|
||||||
|
+ rv = st->ss->load_container(st, mdfd, NULL);
|
||||||
close(mdfd);
|
close(mdfd);
|
||||||
sysfs_free(sra);
|
sysfs_free(sra);
|
||||||
- rv = Incremental(chosen_name, verbose, runstop,
|
- rv = Incremental(chosen_name, verbose, runstop,
|
||||||
- NULL, homehost, require_homehost, autof);
|
- NULL, homehost, require_homehost, autof);
|
||||||
|
+ if (!rv)
|
||||||
+ rv = Incremental_container(st, chosen_name, homehost,
|
+ rv = Incremental_container(st, chosen_name, homehost,
|
||||||
+ verbose, runstop, autof);
|
+ verbose, runstop, autof);
|
||||||
+ map_unlock(&map);
|
+ map_unlock(&map);
|
||||||
if (rv == 1)
|
if (rv == 1)
|
||||||
/* Don't fail the whole -I if a subarray didn't
|
/* Don't fail the whole -I if a subarray didn't
|
||||||
* have enough devices to start yet
|
* 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;
|
trustworthy = FOREIGN;
|
||||||
|
|
||||||
list = st->ss->container_content(st, NULL);
|
list = st->ss->container_content(st, NULL);
|
||||||
@ -66,7 +78,7 @@ index 14184da..9fa6800 100644
|
|||||||
/* do not assemble arrays that might have bad blocks */
|
/* do not assemble arrays that might have bad blocks */
|
||||||
if (list->array.state & (1<<MD_SB_BBM_ERRORS)) {
|
if (list->array.state & (1<<MD_SB_BBM_ERRORS)) {
|
||||||
fprintf(stderr, Name ": BBM log found in metadata. "
|
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);
|
close(sfd);
|
||||||
}
|
}
|
||||||
domain_free(domains);
|
domain_free(domains);
|
||||||
@ -74,6 +86,3 @@ index 14184da..9fa6800 100644
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
|
||||||
1.7.6.4
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: The mdadm program controls Linux md devices (software RAID arrays)
|
Summary: The mdadm program controls Linux md devices (software RAID arrays)
|
||||||
Name: mdadm
|
Name: mdadm
|
||||||
Version: 3.2.2
|
Version: 3.2.2
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
|
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
|
||||||
Source1: mdmonitor.init
|
Source1: mdmonitor.init
|
||||||
Source2: raid-check
|
Source2: raid-check
|
||||||
@ -139,6 +139,11 @@ fi
|
|||||||
%{_initrddir}/*
|
%{_initrddir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Oct 22 2011 Jes Sorensen <Jes.Sorensen@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@redhat.com> - 3.2.2-11
|
* Wed Oct 19 2011 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.2-11
|
||||||
- Fix systemd dependency problem
|
- Fix systemd dependency problem
|
||||||
- Resolves: bz741115 (F16) bz744226 (rawhide)
|
- Resolves: bz741115 (F16) bz744226 (rawhide)
|
||||||
|
Loading…
Reference in New Issue
Block a user