From 15ad866b8c27c52e7ff6d6ba219ff216580519eb33edcf2cb9e6eae737287eee Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 25 Oct 2012 23:19:41 +0000 Subject: [PATCH] - 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 --- blkid-builtin.patch | 13 ------------- find-free-devnum.fix | 32 -------------------------------- mapfile-rebuild.fix | 29 ----------------------------- mdadm-3.2.5.tar.bz2 | 3 --- mdadm-3.2.6.tar.bz2 | 3 +++ mdadm.changes | 8 ++++++++ mdadm.spec | 16 +--------------- mdmon-arg.fix | 24 ------------------------ mdmon-takeover.fix | 31 ------------------------------- udev-offroot | 18 ------------------ udev-rules.fix | 28 ---------------------------- 11 files changed, 12 insertions(+), 193 deletions(-) delete mode 100644 blkid-builtin.patch delete mode 100644 find-free-devnum.fix delete mode 100644 mapfile-rebuild.fix delete mode 100644 mdadm-3.2.5.tar.bz2 create mode 100644 mdadm-3.2.6.tar.bz2 delete mode 100644 mdmon-arg.fix delete mode 100644 mdmon-takeover.fix delete mode 100644 udev-offroot delete mode 100644 udev-rules.fix diff --git a/blkid-builtin.patch b/blkid-builtin.patch deleted file mode 100644 index 4bac8fb..0000000 --- a/blkid-builtin.patch +++ /dev/null @@ -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}" diff --git a/find-free-devnum.fix b/find-free-devnum.fix deleted file mode 100644 index 3462a45..0000000 --- a/find-free-devnum.fix +++ /dev/null @@ -1,32 +0,0 @@ -From fb52f2457a4df4f7061be7a0524763193a6355a7 Mon Sep 17 00:00:00 2001 -From: NeilBrown -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 - ---- - 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); diff --git a/mapfile-rebuild.fix b/mapfile-rebuild.fix deleted file mode 100644 index 888d9dc..0000000 --- a/mapfile-rebuild.fix +++ /dev/null @@ -1,29 +0,0 @@ -From a74e5731ba8c32f74c60e45c244735d602d14dca Mon Sep 17 00:00:00 2001 -From: NeilBrown -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 - -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; - diff --git a/mdadm-3.2.5.tar.bz2 b/mdadm-3.2.5.tar.bz2 deleted file mode 100644 index 9397b94..0000000 --- a/mdadm-3.2.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ae2bfd241c88601c1ef9072806248491e025fa09a388c40230d72d65eabbd3c -size 369582 diff --git a/mdadm-3.2.6.tar.bz2 b/mdadm-3.2.6.tar.bz2 new file mode 100644 index 0000000..612f96f --- /dev/null +++ b/mdadm-3.2.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c44ed3b31238b41cffe67caffaf45067d01e095de94988889ea8a94e22dc6c38 +size 371525 diff --git a/mdadm.changes b/mdadm.changes index 2555704..8069509 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -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 diff --git a/mdadm.spec b/mdadm.spec index 9842a0a..73e7808 100644 --- a/mdadm.spec +++ b/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" diff --git a/mdmon-arg.fix b/mdmon-arg.fix deleted file mode 100644 index 9c28371..0000000 --- a/mdmon-arg.fix +++ /dev/null @@ -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 - ---- - 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: diff --git a/mdmon-takeover.fix b/mdmon-takeover.fix deleted file mode 100644 index 93ef363..0000000 --- a/mdmon-takeover.fix +++ /dev/null @@ -1,31 +0,0 @@ -From a99d3469713138f050cccb8657c24a05ffa7057e Mon Sep 17 00:00:00 2001 -From: NeilBrown -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 - ---- - 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); diff --git a/udev-offroot b/udev-offroot deleted file mode 100644 index 09de0a7..0000000 --- a/udev-offroot +++ /dev/null @@ -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" - diff --git a/udev-rules.fix b/udev-rules.fix deleted file mode 100644 index c218957..0000000 --- a/udev-rules.fix +++ /dev/null @@ -1,28 +0,0 @@ -From 339b77467a7ad5e5354b5ab0542f8148b18c898c Mon Sep 17 00:00:00 2001 -From: NeilBrown -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 - -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"