[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#843775: jessie-pu: package mdadm/3.3.2-5+deb8u2



Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

I prepared a package for mdadm to fix bug #840743
(https://bugs.debian.org/840743) which prevents a correct reshape when only one
'spare' device and no backup-file is used.
This can result in a nonfunctional array.

The upstream package 3.3.3 includes the commit from Neil Brown in which this
behavior is fixed.
http://git.neil.brown.name/?p=mdadm.git;a=commit;h=8e7ddc5f50af00e569ef115e25c635e2d74e90f0

I cherry-picked this commit for the stable version.

Unfortunately the package maintainer (CC of this mail) did not responded to
this bug report yet. I
(Opened 14 Oct 2016).

The source package can be found at
https://mentors.debian.net/debian/pool/main/m/mdadm/mdadm_3.3.2-5+deb8u2.dsc

diff -Nru mdadm-3.3.2/debian/changelog mdadm-3.3.2/debian/changelog
--- mdadm-3.3.2/debian/changelog        2015-12-28 15:55:05.000000000 +0100
+++ mdadm-3.3.2/debian/changelog        2016-11-09 00:43:48.000000000 +0100
@@ -1,3 +1,12 @@
+mdadm (3.3.2-5+deb8u2) jessie; urgency=medium
+
+  * Non-maintainer upload.
+  * fix-grow-continue.patch: Port upstream fix to let '--grow --continue'
+    successfully reshape an array when using backup space on a 'spare' device.
+    (Closes: #840743)
+
+ -- Jens Sauer <jsauer65@gmail.com>  Wed, 09 Nov 2016 00:43:48 +0100
+
 mdadm (3.3.2-5+deb8u1) jessie; urgency=medium

   * Non-maintainer upload.
diff -Nru mdadm-3.3.2/debian/patches/fix-grow-continue.patch
mdadm-3.3.2/debian/patches/fix-grow-continue.patch
--- mdadm-3.3.2/debian/patches/fix-grow-continue.patch  1970-01-01
01:00:00.000000000 +0100
+++ mdadm-3.3.2/debian/patches/fix-grow-continue.patch  2016-11-09
00:43:48.000000000 +0100
@@ -0,0 +1,35 @@
+Subject: Fix '--grow --continue' when using backup space on a 'spare' device
+Origin: upstream,
http://git.neil.brown.name/?p=mdadm.git;a=commit;h=8e7ddc5f50af00e569ef115e25c635e2d74e90f0
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840743
+Author: Neil Brown <neilb@suse.de>
+
+--- mdadm-3.3.2.orig/Grow.c
++++ mdadm-3.3.2/Grow.c
+@@ -853,7 +853,8 @@ int reshape_prepare_fdlist(char *devname
+       for (sd = sra->devs; sd; sd = sd->next) {
+               if (sd->disk.state & (1<<MD_DISK_FAULTY))
+                       continue;
+-              if (sd->disk.state & (1<<MD_DISK_SYNC)) {
++              if (sd->disk.state & (1<<MD_DISK_SYNC) &&
++                  sd->disk.raid_disk < raid_disks) {
+                       char *dn = map_dev(sd->disk.major,
+                                          sd->disk.minor, 1);
+                       fdlist[sd->disk.raid_disk]
+@@ -3216,7 +3217,7 @@ started:
+       d = reshape_prepare_fdlist(devname, sra, odisks,
+                                  nrdisks, blocks, backup_file,
+                                  fdlist, offsets);
+-      if (d < 0) {
++      if (d < odisks) {
+               goto release;
+       }
+       if ((st->ss->manage_reshape == NULL) ||
+@@ -3228,7 +3229,7 @@ started:
+                                      devname);
+                               pr_err(" Please provide one with \"--
backup=...\"\n");
+                               goto release;
+-                      } else if (sra->array.spare_disks == 0) {
++                      } else if (d == odisks) {
+                               pr_err("%s: Cannot grow - "
+                                       "need a spare or backup-file to backup
"
+                                       "critical section\n", devname);
diff -Nru mdadm-3.3.2/debian/patches/series mdadm-3.3.2/debian/patches/series
--- mdadm-3.3.2/debian/patches/series   2015-11-10 11:13:53.000000000 +0100
+++ mdadm-3.3.2/debian/patches/series   2016-11-09 00:43:48.000000000 +0100
@@ -8,3 +8,4 @@
 readlink-path.patch
 mdmonitor-service-simplify.diff
 disable-incremental-assembly.patch
+fix-grow-continue.patch


Reply to: