- new upstream release 3.2.6. Subsumes all of our
patches and adds a lot of other bug fixes for less common cases including for a couple that cause mdadm to crash. OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=77
This commit is contained in:
parent
2e9b215bf9
commit
15ad866b8c
@ -1,13 +0,0 @@
|
||||
Index: mdadm-3.2.5/udev-md-raid.rules
|
||||
===================================================================
|
||||
--- mdadm-3.2.5.orig/udev-md-raid.rules
|
||||
+++ mdadm-3.2.5/udev-md-raid.rules
|
||||
@@ -40,7 +40,7 @@ ENV{DEVTYPE}=="partition", ENV{MD_UUID}=
|
||||
ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
|
||||
|
||||
-IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
|
||||
+IMPORT{builtin}="blkid"
|
||||
OPTIONS+="link_priority=100"
|
||||
OPTIONS+="watch"
|
||||
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
@ -1,32 +0,0 @@
|
||||
From fb52f2457a4df4f7061be7a0524763193a6355a7 Mon Sep 17 00:00:00 2001
|
||||
From: NeilBrown <neilb@suse.de>
|
||||
Date: Mon, 20 Aug 2012 10:50:42 +1000
|
||||
Subject: [PATCH] find_free_devnum: avoid auto-using names in /etc/mdadm.conf
|
||||
|
||||
high-number names like "/dev/md126" shouldn't be in /etc/mdadm.conf,
|
||||
but if they are they should be ignored when choosing an
|
||||
unused number.
|
||||
|
||||
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
|
||||
---
|
||||
util.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- mdadm-3.2.5.orig/util.c
|
||||
+++ mdadm-3.2.5/util.c
|
||||
@@ -796,10 +796,14 @@ int find_free_devnum(int use_partitions)
|
||||
devnum = devnum ? devnum-1 : (1<<20)-1) {
|
||||
char *dn;
|
||||
int _devnum;
|
||||
+ char nbuf[50];
|
||||
|
||||
_devnum = use_partitions ? (-1-devnum) : devnum;
|
||||
if (mddev_busy(_devnum))
|
||||
continue;
|
||||
+ sprintf(nbuf, "%s%d", use_partitions?"mdp":"md", devnum);
|
||||
+ if (!conf_name_is_free(nbuf))
|
||||
+ continue;
|
||||
/* make sure it is new to /dev too, at least as a
|
||||
* non-standard */
|
||||
dn = map_dev(dev2major(_devnum), dev2minor(_devnum), 0);
|
@ -1,29 +0,0 @@
|
||||
From a74e5731ba8c32f74c60e45c244735d602d14dca Mon Sep 17 00:00:00 2001
|
||||
From: NeilBrown <neilb@suse.de>
|
||||
Date: Mon, 20 Aug 2012 12:34:28 +1000
|
||||
Subject: [PATCH] mapfile: fix mapfile rebuild for containers
|
||||
|
||||
When recreating the mapfile entry for a container we need to
|
||||
use ->getinfo_super, not ->container_content, just like we
|
||||
do in Detail().
|
||||
|
||||
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
|
||||
diff --git a/mapfile.c b/mapfile.c
|
||||
index fa23883..6712733 100644
|
||||
--- a/mapfile.c
|
||||
+++ b/mapfile.c
|
||||
@@ -403,7 +403,12 @@ void RebuildMap(void)
|
||||
close(dfd);
|
||||
if (ok != 0)
|
||||
continue;
|
||||
- info = st->ss->container_content(st, subarray);
|
||||
+ if (subarray)
|
||||
+ info = st->ss->container_content(st, subarray);
|
||||
+ else {
|
||||
+ info = malloc(sizeof(*info));
|
||||
+ st->ss->getinfo_super(st, info, NULL);
|
||||
+ }
|
||||
if (!info)
|
||||
continue;
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5ae2bfd241c88601c1ef9072806248491e025fa09a388c40230d72d65eabbd3c
|
||||
size 369582
|
3
mdadm-3.2.6.tar.bz2
Normal file
3
mdadm-3.2.6.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c44ed3b31238b41cffe67caffaf45067d01e095de94988889ea8a94e22dc6c38
|
||||
size 371525
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 25 23:18:19 UTC 2012 - nfbrown@suse.com
|
||||
|
||||
- new upstream release 3.2.6. Subsumes all of our
|
||||
patches and adds a lot of other bug fixes for
|
||||
less common cases including for a couple that cause
|
||||
mdadm to crash.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 9 03:35:22 UTC 2012 - nfbrown@suse.com
|
||||
|
||||
|
16
mdadm.spec
16
mdadm.spec
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: mdadm
|
||||
Version: 3.2.5
|
||||
Version: 3.2.6
|
||||
Release: 0
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: sgmltool
|
||||
@ -39,13 +39,6 @@ Source5: mkinitrd-setup.sh
|
||||
Source6: mkinitrd-boot.sh
|
||||
Source7: mdadm.cron
|
||||
Source8: mdadm.shutdown
|
||||
Patch1: udev-rules.fix
|
||||
Patch2: mdmon-arg.fix
|
||||
Patch3: blkid-builtin.patch
|
||||
Patch4: mdmon-takeover.fix
|
||||
Patch5: find-free-devnum.fix
|
||||
Patch6: mapfile-rebuild.fix
|
||||
Patch7: udev-offroot
|
||||
|
||||
%description
|
||||
Mdadm is a program that can be used to control Linux md devices. It is
|
||||
@ -54,13 +47,6 @@ programs but with a very different interface.
|
||||
|
||||
%prep
|
||||
%setup -q -a1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error"
|
||||
|
@ -1,24 +0,0 @@
|
||||
|
||||
Fix parsing of mdmon args.
|
||||
The conversion to use getopt_long added an incorrect assignment to
|
||||
container_name.
|
||||
This causes "mdmon --all --takeover" to fail.
|
||||
|
||||
bnc#767150
|
||||
|
||||
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
|
||||
---
|
||||
mdmon.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- mdadm-3.2.5.orig/mdmon.c
|
||||
+++ mdadm-3.2.5/mdmon.c
|
||||
@@ -306,7 +306,6 @@ int main(int argc, char *argv[])
|
||||
all = 1;
|
||||
break;
|
||||
case 't':
|
||||
- container_name = optarg;
|
||||
takeover = 1;
|
||||
break;
|
||||
case OffRootOpt:
|
@ -1,31 +0,0 @@
|
||||
From a99d3469713138f050cccb8657c24a05ffa7057e Mon Sep 17 00:00:00 2001
|
||||
From: NeilBrown <neilb@suse.de>
|
||||
Date: Mon, 20 Aug 2012 10:37:21 +1000
|
||||
Subject: [PATCH] mdmon: allow --takeover when original was started with
|
||||
--offroot
|
||||
|
||||
As --offroot causes ARGV[0] to be changed, we need to be more
|
||||
lenient when checking that the mdmon we are about to kill really
|
||||
is mdmon. i.e. allow name to be "@dmon" instead.
|
||||
|
||||
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
|
||||
---
|
||||
mdmon.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- mdadm-3.2.5.orig/mdmon.c
|
||||
+++ mdadm-3.2.5/mdmon.c
|
||||
@@ -184,7 +184,11 @@ static void try_kill_monitor(pid_t pid,
|
||||
buf[sizeof(buf)-1] = 0;
|
||||
close(fd);
|
||||
|
||||
- if (n < 0 || !strstr(buf, "mdmon"))
|
||||
+ /* Note that if started with --offroot, the name
|
||||
+ * might be "@dmon"
|
||||
+ */
|
||||
+ if (n < 0 || !(strstr(buf, "mdmon") ||
|
||||
+ strstr(buf, "@dmon")))
|
||||
return;
|
||||
|
||||
kill(pid, SIGTERM);
|
18
udev-offroot
18
udev-offroot
@ -1,18 +0,0 @@
|
||||
Use --offroot flag when assembling md arrays.
|
||||
|
||||
This ensures that mdmon won't be killed by systemd.
|
||||
---
|
||||
udev-md-raid.rules | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- mdadm-3.2.5.orig/udev-md-raid.rules
|
||||
+++ mdadm-3.2.5/udev-md-raid.rules
|
||||
@@ -10,7 +10,7 @@ LABEL="md_inc"
|
||||
|
||||
# remember you can limit what gets auto/incrementally assembled by
|
||||
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
|
||||
-ACTION=="add", RUN+="/sbin/mdadm --incremental $tempnode"
|
||||
+ACTION=="add", RUN+="/sbin/mdadm --incremental $tempnode --offroot"
|
||||
ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
|
||||
ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 339b77467a7ad5e5354b5ab0542f8148b18c898c Mon Sep 17 00:00:00 2001
|
||||
From: NeilBrown <neilb@suse.de>
|
||||
Date: Thu, 24 May 2012 11:49:49 +1000
|
||||
Subject: [PATCH] udev-rules: prevent systemd from mount devices before they
|
||||
are ready.
|
||||
|
||||
When an array is assembled incrementally, systemd might see it
|
||||
before it is ready, try to mount it, fail, and give up.
|
||||
Result is that array doesn't get mounted.
|
||||
|
||||
If we ask udev to tell systemd that it isn't ready yet in this
|
||||
case, systemd waits until it is ready, and all are happy.
|
||||
|
||||
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
|
||||
diff --git a/udev-md-raid.rules b/udev-md-raid.rules
|
||||
index f564f70..814c897 100644
|
||||
--- a/udev-md-raid.rules
|
||||
+++ b/udev-md-raid.rules
|
||||
@@ -28,7 +28,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
|
||||
# never leave state 'inactive'
|
||||
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
|
||||
TEST!="md/array_state", GOTO="md_end"
|
||||
-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
|
||||
+ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
|
||||
LABEL="md_ignore_state"
|
||||
|
||||
IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
|
Loading…
Reference in New Issue
Block a user