From e3c859c779b72939bfcc77f9749d9f47a67401883dde385dbb6e09282376241f Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 13 Jul 2015 09:20:46 +0000 Subject: [PATCH 1/3] . OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=130 --- mdadm.changes | 7 +++++++ mdadm.spec | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mdadm.changes b/mdadm.changes index 83d30dd..9e54b29 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jul 13 09:19:36 UTC 2015 - werner@suse.de + +- Make it build, that is build-require pkgconfig of udev and the + package systemd as this one is the owner of the directory + /usr/lib/systemd/system-shutdown + ------------------------------------------------------------------- Mon Mar 2 20:33:12 UTC 2015 - mgorse@suse.com diff --git a/mdadm.spec b/mdadm.spec index 26cc718..745d14d 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ # # spec file for package mdadm # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,8 +23,10 @@ BuildRequires: binutils-devel BuildRequires: groff BuildRequires: pkgconfig BuildRequires: sgmltool +BuildRequires: systemd BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(udev) PreReq: %fillup_prereq /sbin/mkinitrd Recommends: cron Recommends: smtp_daemon From 5528872f926ecdbae1d9f9a80803e57689e0f5a0ecc47d0b432c19c188a54563 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 27 Jul 2015 05:12:21 +0000 Subject: [PATCH 2/3] - new upstream version 3.3.3. Lots of bug fixes, particular "mdadm --assemble --force" would often not do the right thing for RAID5. - 0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch 0001-Grow-fix-removal-of-line-in-wrong-case.patch 0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch 0001-Makefile-install-mdadm-grow-continue-.service.patch mdcheck-careful.patch mdcheck-no-devices.fix All removed as now included upstream. OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=131 --- ...try-to-restart-if-reshape-is-running.patch | 45 ------- ...ow-fix-removal-of-line-in-wrong-case.patch | 39 ------ ...-message-when-assemble-spanned-conta.patch | 126 ------------------ ...install-mdadm-grow-continue-.service.patch | 28 ---- mdadm-3.3.1.tar.xz | 3 - mdadm-3.3.3.tar.xz | 3 + mdadm.changes | 17 +++ mdadm.spec | 20 +-- mdcheck-careful.patch | 27 ---- mdcheck-no-devices.fix | 14 -- 10 files changed, 21 insertions(+), 301 deletions(-) delete mode 100644 0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch delete mode 100644 0001-Grow-fix-removal-of-line-in-wrong-case.patch delete mode 100644 0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch delete mode 100644 0001-Makefile-install-mdadm-grow-continue-.service.patch delete mode 100644 mdadm-3.3.1.tar.xz create mode 100644 mdadm-3.3.3.tar.xz delete mode 100644 mdcheck-careful.patch delete mode 100644 mdcheck-no-devices.fix diff --git a/0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch b/0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch deleted file mode 100644 index 029e015..0000000 --- a/0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 13ffbe89b6103c146c08eb1c9a70833306c8322b Mon Sep 17 00:00:00 2001 -From: Pawel Baldysiak -Date: Wed, 16 Jul 2014 12:20:34 +0200 -Subject: [PATCH] Grow: Do not try to restart if reshape is running - -Grow process did not check if reshape is already started -when deciding about restarting. -Sync_action should be checked in this case, and if -reshape is running - restart flag should not be set. -Otherwise, Grow process will fail to write data to -sysfs, and reshape will not be continued. - -Signed-off-by: Pawel Baldysiak -Signed-off-by: Artur Paszkiewicz -Signed-off-by: NeilBrown ---- - Grow.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/Grow.c b/Grow.c -index a2f4f1428787..ea9cc60e1f18 100644 ---- a/Grow.c -+++ b/Grow.c -@@ -2822,6 +2822,7 @@ static int reshape_array(char *container, int fd, char *devname, - unsigned long long array_size; - int done; - struct mdinfo *sra = NULL; -+ char buf[20]; - - /* when reshaping a RAID0, the component_size might be zero. - * So try to fix that up. -@@ -2869,7 +2870,9 @@ static int reshape_array(char *container, int fd, char *devname, - goto release; - } - -- if (st->ss->external && restart && (info->reshape_progress == 0)) { -+ if (st->ss->external && restart && (info->reshape_progress == 0) && -+ !((sysfs_get_str(info, NULL, "sync_action", buf, sizeof(buf)) > 0) && -+ (strncmp(buf, "reshape", 7) == 0))) { - /* When reshape is restarted from '0', very begin of array - * it is possible that for external metadata reshape and array - * configuration doesn't happen. --- -2.0.0 - diff --git a/0001-Grow-fix-removal-of-line-in-wrong-case.patch b/0001-Grow-fix-removal-of-line-in-wrong-case.patch deleted file mode 100644 index 2ab694f..0000000 --- a/0001-Grow-fix-removal-of-line-in-wrong-case.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e339dba2a1744dc6860a58e286ded39fc993c2db Mon Sep 17 00:00:00 2001 -From: Pawel Baldysiak -Date: Wed, 11 Jun 2014 15:18:44 +0000 -Subject: [PATCH] Grow: fix removal of line in wrong case - -Commit 18d9bcfa33939cee345d4d7735bc6081bcc409c8 -removed wrong line (in case RAID0->RAID4). -This patch corrects this mistake -(line should be removed in case RAID4->RAID4). - -Signed-off-by: Pawel Baldysiak -Signed-off-by: NeilBrown ---- - Grow.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Grow.c b/Grow.c -index 12730e26fd19..a2f4f1428787 100644 ---- a/Grow.c -+++ b/Grow.c -@@ -1324,6 +1324,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) - - switch (re->level) { - case 4: -+ re->before.layout = 0; - re->after.layout = 0; - break; - case 5: -@@ -1339,7 +1340,6 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) - - switch (re->level) { - case 4: -- re->before.layout = 0; - re->after.layout = 0; - break; - case 5: --- -2.0.0 - diff --git a/0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch b/0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch deleted file mode 100644 index bfe3203..0000000 --- a/0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 0c21b485e4beb7bcfe631412a231f7c1ea1067bc Mon Sep 17 00:00:00 2001 -From: Pawel Baldysiak -Date: Mon, 30 Jun 2014 12:22:22 +0000 -Subject: [PATCH] IMSM: Add warning message when assemble spanned container - -Due to several changes in code assemble with disks -spanned between different controllers can be obtained -in some cases. After IMSM container will be assembled, check HBA of -disks, and print proper warning if mismatch is detected. - -Signed-off-by: Pawel Baldysiak -Signed-off-by: Artur Paszkiewicz -Signed-off-by: NeilBrown ---- - Assemble.c | 16 ++++++++++++++++ - mdadm.h | 3 +++ - platform-intel.h | 1 + - super-intel.c | 43 +++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 63 insertions(+) - ---- mdadm-3.3.1.orig/Assemble.c -+++ mdadm-3.3.1/Assemble.c -@@ -1001,6 +1001,22 @@ static int start_array(int mdfd, - content->array.raid_disks); - fprintf(stderr, "\n"); - } -+ -+ if (st->ss->validate_container) { -+ struct mdinfo *devices_list; -+ struct mdinfo *info_devices = xmalloc(sizeof(struct mdinfo)*(okcnt+sparecnt)); -+ unsigned int count; -+ devices_list = NULL; -+ for (count = 0; count < okcnt+sparecnt; count++) { -+ info_devices[count] = devices[count].i; -+ info_devices[count].next = devices_list; -+ devices_list = &info_devices[count]; -+ } -+ if (st->ss->validate_container(devices_list)) -+ pr_err("Mismatch detected!\n"); -+ free(info_devices); -+ } -+ - st->ss->free_super(st); - sysfs_uevent(content, "change"); - if (err_ok && okcnt < (unsigned)content->array.raid_disks) ---- mdadm-3.3.1.orig/mdadm.h -+++ mdadm-3.3.1/mdadm.h -@@ -965,6 +965,9 @@ extern struct superswitch { - /* for external backup area */ - int (*recover_backup)(struct supertype *st, struct mdinfo *info); - -+ /* validate container after assemble */ -+ int (*validate_container)(struct mdinfo *info); -+ - int swapuuid; /* true if uuid is bigending rather than hostendian */ - int external; - const char *name; /* canonical metadata name */ ---- mdadm-3.3.1.orig/platform-intel.h -+++ mdadm-3.3.1/platform-intel.h -@@ -204,6 +204,7 @@ struct sys_dev *find_intel_devices(void) - const struct imsm_orom *find_imsm_capability(enum sys_dev_type hba_id); - const struct imsm_orom *find_imsm_orom(void); - int disk_attached_to_hba(int fd, const char *hba_path); -+int devt_attached_to_hba(dev_t dev, const char *hba_path); - char *devt_to_devpath(dev_t dev); - int path_attached_to_hba(const char *disk_path, const char *hba_path); - const char *get_sys_dev_type(enum sys_dev_type); ---- mdadm-3.3.1.orig/super-intel.c -+++ mdadm-3.3.1/super-intel.c -@@ -10484,6 +10484,48 @@ abort: - - return ret_val; - } -+ -+/******************************************************************************* -+ * Function: validate_container_imsm -+ * Description: This routine validates container after assemble, -+ * eg. if devices in container are under the same controller. -+ * -+ * Parameters: -+ * info : linked list with info about devices used in array -+ * Returns: -+ * 1 : HBA mismatch -+ * 0 : Success -+ ******************************************************************************/ -+int validate_container_imsm(struct mdinfo *info) -+{ -+ if (!check_env("IMSM_NO_PLATFORM")) { -+ struct sys_dev *idev; -+ struct mdinfo *dev; -+ char *hba_path = NULL; -+ char *dev_path = devt_to_devpath(makedev(info->disk.major, -+ info->disk.minor)); -+ -+ for (idev = find_intel_devices(); idev; idev = idev->next) { -+ if (strstr(dev_path, idev->path)) { -+ hba_path = idev->path; -+ break; -+ } -+ } -+ free(dev_path); -+ -+ if (hba_path) { -+ for (dev = info->next; dev; dev = dev->next) { -+ if (!devt_attached_to_hba(makedev(dev->disk.major, -+ dev->disk.minor), hba_path)) { -+ pr_err("WARNING - IMSM container assembled with disks under different HBAs!\n" -+ " This operation is not supported and can lead to data loss.\n"); -+ return 1; -+ } -+ } -+ } -+ } -+ return 0; -+} - #endif /* MDASSEMBLE */ - - struct superswitch super_imsm = { -@@ -10527,6 +10569,7 @@ struct superswitch super_imsm = { - .free_super = free_super_imsm, - .match_metadata_desc = match_metadata_desc_imsm, - .container_content = container_content_imsm, -+ .validate_container = validate_container_imsm, - - .external = 1, - .name = "imsm", diff --git a/0001-Makefile-install-mdadm-grow-continue-.service.patch b/0001-Makefile-install-mdadm-grow-continue-.service.patch deleted file mode 100644 index 83d078d..0000000 --- a/0001-Makefile-install-mdadm-grow-continue-.service.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 616f197f9d6d044afb9e27ddc9cd087d21d610f0 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Tue, 10 Jun 2014 20:34:40 +1000 -Subject: [PATCH] Makefile: install mdadm-grow-continue@.service - -Forgot to add this to install-systemd target - -Signed-off-by: NeilBrown ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index c7e7a4272cde..1a4a5dcdb720 100644 ---- a/Makefile -+++ b/Makefile -@@ -290,7 +290,7 @@ install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules - - install-systemd: systemd/mdmon@.service - @for file in mdmon@.service mdmonitor.service mdadm-last-resort@.timer \ -- mdadm-last-resort@.service ; \ -+ mdadm-last-resort@.service mdadm-grow-continue@.service; \ - do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp && \ - echo $(INSTALL) -D -m 644 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \ - $(INSTALL) -D -m 644 .install.tmp $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \ --- -2.0.0 - diff --git a/mdadm-3.3.1.tar.xz b/mdadm-3.3.1.tar.xz deleted file mode 100644 index dc8bd3b..0000000 --- a/mdadm-3.3.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8c74112cfd77bdc1dbc1291fe8d9243c76d91bfa276fcb95f2a75ca7717ab02 -size 407964 diff --git a/mdadm-3.3.3.tar.xz b/mdadm-3.3.3.tar.xz new file mode 100644 index 0000000..be70ec2 --- /dev/null +++ b/mdadm-3.3.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5b50a6b506697fb9968d660444447473b453f9eaefaa9b7d31c184693b8a28c +size 413140 diff --git a/mdadm.changes b/mdadm.changes index 9e54b29..7cfff4b 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Mon Jul 27 04:17:43 UTC 2015 - nfbrown@suse.com + +- new upstream version 3.3.3. Lots of bug fixes, particular + "mdadm --assemble --force" would often not do the right thing + for RAID5. + +- 0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch + 0001-Grow-fix-removal-of-line-in-wrong-case.patch + 0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch + 0001-Makefile-install-mdadm-grow-continue-.service.patch + mdcheck-careful.patch + mdcheck-no-devices.fix + + All removed as now included upstream. + + ------------------------------------------------------------------- Mon Jul 13 09:19:36 UTC 2015 - werner@suse.de diff --git a/mdadm.spec b/mdadm.spec index 745d14d..937352b 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -17,7 +17,7 @@ Name: mdadm -Version: 3.3.1 +Version: 3.3.3 Release: 0 BuildRequires: binutils-devel BuildRequires: groff @@ -40,18 +40,6 @@ Source1: Software-RAID.HOWTO.tar.bz2 Source2: sysconfig.mdadm Source3: cron.d.mdadm Source7: mdadm.cron -# PATCH-FIX-UPSTREAM 0001-Makefile-install-mdadm-grow-continue-.service.patch nfbrown@suse.de -Patch1: 0001-Makefile-install-mdadm-grow-continue-.service.patch -# PATCH-FIX-UPSTREAM 0001-Grow-fix-removal-of-line-in-wrong-case.patch bnc#881530 nfbrown@suse.de -Patch2: 0001-Grow-fix-removal-of-line-in-wrong-case.patch -# PATCH-FIX-UPSTREAM mdcheck-no-devices.fix bnc#903051 nfbrown@suse.de -Patch3: mdcheck-no-devices.fix -# PATCH-FIX-UPSTREAM mdcheck-careful.patch bnc#910500 nfbrown@suse.de -Patch4: mdcheck-careful.patch -# PATCH-FIX-UPSTREAM 0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch bnc#882634 nfbrown@suse.de -Patch5: 0001-IMSM-Add-warning-message-when-assemble-spanned-conta.patch -# PATCH-FIX-UPSTREAM 0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch bnc#887773 nfbrown@suse.de -Patch6: 0001-Grow-Do-not-try-to-restart-if-reshape-is-running.patch %define _udevdir %(pkg-config --variable=udevdir udev) %define _systemdshutdowndir %{_unitdir}/../system-shutdown @@ -63,12 +51,6 @@ programs but with a very different interface. %prep %setup -q -a1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %build make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes diff --git a/mdcheck-careful.patch b/mdcheck-careful.patch deleted file mode 100644 index a12e055..0000000 --- a/mdcheck-careful.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 979b1feb093b1c2e0f8b58716329f2da092741d4 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Wed, 4 Feb 2015 09:06:47 +1100 -Subject: [PATCH] mdcheck: be careful when sourcing the output of "mdadm - --detail --export" - -The output of "mdadm --detail --export" isn't quoted properly so -fields that contain spaces can be a problem. -We only want the MD_UUID field, and it has a very well defined -format with no spaces. -So use 'grep' to limit the output to just that. - -Signed-off-by: NeilBrown - -diff --git a/misc/mdcheck b/misc/mdcheck -index ca5fe84a1284..2c8f54d6e4cf 100644 ---- a/misc/mdcheck -+++ b/misc/mdcheck -@@ -88,7 +88,7 @@ do - continue - fi - -- mdadm --detail --export "$dev" > $tmp || continue -+ mdadm --detail --export "$dev" | grep '^MD_UUID=' > $tmp || continue - source $tmp - fl="/var/lib/mdcheck/MD_UUID_$MD_UUID" - if [ -z "$cont" ] diff --git a/mdcheck-no-devices.fix b/mdcheck-no-devices.fix deleted file mode 100644 index a2939c1..0000000 --- a/mdcheck-no-devices.fix +++ /dev/null @@ -1,14 +0,0 @@ ---- - misc/mdcheck | 1 + - 1 file changed, 1 insertion(+) - ---- mdadm-3.3.1.orig/misc/mdcheck -+++ mdadm-3.3.1/misc/mdcheck -@@ -77,6 +77,7 @@ find /var/lib/mdcheck -name "MD_UUID*" - - cnt=0 - for dev in /dev/md?* - do -+ [ -e "$dev" ] || continue - sys=`sysname $dev` - if [ ! -f "$sys/md/sync_action" ] - then # cannot check this array From 6d6d2fa509e2bde2e876f3dc2c79cb97af95c3fa93e0e7249d1bbecc4274d456 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 3 Aug 2015 06:34:23 +0000 Subject: [PATCH 3/3] - new upstream version 3.3.4. Important bugfix to honour IMSM ROM settings when RAID is disabled. (bsc#939748 bsc#937363) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=132 --- mdadm-3.3.3.tar.xz | 3 --- mdadm-3.3.4.tar.xz | 3 +++ mdadm.changes | 7 +++++++ mdadm.spec | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 mdadm-3.3.3.tar.xz create mode 100644 mdadm-3.3.4.tar.xz diff --git a/mdadm-3.3.3.tar.xz b/mdadm-3.3.3.tar.xz deleted file mode 100644 index be70ec2..0000000 --- a/mdadm-3.3.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f5b50a6b506697fb9968d660444447473b453f9eaefaa9b7d31c184693b8a28c -size 413140 diff --git a/mdadm-3.3.4.tar.xz b/mdadm-3.3.4.tar.xz new file mode 100644 index 0000000..6d51491 --- /dev/null +++ b/mdadm-3.3.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68 +size 413396 diff --git a/mdadm.changes b/mdadm.changes index 7cfff4b..f11b995 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 3 06:25:56 UTC 2015 - nfbrown@suse.com + +- new upstream version 3.3.4. Important bugfix + to honour IMSM ROM settings when RAID is disabled. + (bsc#939748 bsc#937363) + ------------------------------------------------------------------- Mon Jul 27 04:17:43 UTC 2015 - nfbrown@suse.com diff --git a/mdadm.spec b/mdadm.spec index 937352b..821576c 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -17,7 +17,7 @@ Name: mdadm -Version: 3.3.3 +Version: 3.3.4 Release: 0 BuildRequires: binutils-devel BuildRequires: groff