Package: mdadm / 4.1-1

Metadata

Package Version Patches format
mdadm 4.1-1 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0001 Assemble keep MD_DISK_FAILFAST and MD_DISK_WRITEMOST.patch | (download)

Assemble.c | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 [patch 01/11] assemble: keep md_disk_failfast and md_disk_writemostly
 flag

Before updating superblock of slave disks, desired_state value
is set for the target state of the slave disks. But it forgets
to check MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flags. Then
start_arrays() calls ADD_NEW_DISK ioctl-call and pass the state
without MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY.

Currenlty it does not generate any problem because kernel does not
care MD_DISK_FAILFAST or MD_DISK_WRITEMOSTLY flags.

0002 Document PART POLICY lines.patch | (download)

mdadm.conf.5 | 24 23 + 1 - 0 !
policy.c | 2 1 + 1 - 0 !
2 files changed, 24 insertions(+), 2 deletions(-)

 [patch 02/11] document part-policy lines

PART-POLICY has been accepted in mdadm.conf since the same
time that POLICY was accepted, but it was never documented.
So add the missing documentation.

Also fix a bug which would have stopped it from working if
anyone had ever tried to use it.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

0003 policy support devices with multiple paths.patch | (download)

Incremental.c | 5 4 + 1 - 0 !
mdadm.h | 2 1 + 1 - 0 !
policy.c | 163 90 + 73 - 0 !
3 files changed, 95 insertions(+), 75 deletions(-)

 [patch 03/11] policy: support devices with multiple paths.

As new releases of Linux some time change the name of
a path, some distros keep "legacy" names as well.  This
is useful, but confuses mdadm which assumes each device has
precisely one path.

So change this assumption:  allow a disk to have several
paths, and allow any to match when looking for a policy
which matches a disk.

Reported-and-tested-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

0004 mdcheck add systemd unit files to run mdcheck.patch | (download)

Makefile | 5 4 + 1 - 0 !
systemd/mdcheck_continue.service | 18 18 + 0 - 0 !
systemd/mdcheck_continue.timer | 13 13 + 0 - 0 !
systemd/mdcheck_start.service | 17 17 + 0 - 0 !
systemd/mdcheck_start.timer | 15 15 + 0 - 0 !
5 files changed, 67 insertions(+), 1 deletion(-)

 [patch 04/11] mdcheck: add systemd unit files to run mdcheck.

Having the mdcheck script is not use if is never run.
This patch adds systemd unit files so that it can easily
be run on the first Sunday of each month for 6 hours,
then on every subsequent morning until the check is
finished.

The units still need to be enabled with
  systemctl enable mdcheck_start.timer

The timer will only actually be started when an array
which might need it becomes active.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

0005 Monitor add system timer to run oneshot periodically.patch | (download)

Makefile | 1 1 + 0 - 0 !
systemd/mdmonitor-oneshot.service | 15 15 + 0 - 0 !
systemd/mdmonitor-oneshot.timer | 15 15 + 0 - 0 !
3 files changed, 31 insertions(+)

 [patch 05/11] monitor: add system timer to run --oneshot periodically

"mdadm --monitor --oneshot" can be used to get a warning
if there are any degraded arrays.  It can be helpful to get
this warning periodically while the condition persists.

This patch add a systemd service and timer which can
be enabled with
   systemctl enable mdmonitor-oneshot.service

and will then provide daily warnings.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

0006 imsm update metadata correctly while raid10 double d.patch | (download)

super-intel.c | 25 19 + 6 - 0 !
1 file changed, 19 insertions(+), 6 deletions(-)

 [patch 06/11] imsm: update metadata correctly while raid10 double
 degradation

Mdmon calls end_migration() when map state changes from normal to
degraded. It is not valid because in raid 10 double degradation case
mdmon breaks checkpointing but array is still rebuilding.
In this case mdmon has to mark map as degraded and continues marking
recovery checkpoint in metadata. Migration can be finished only if newly
failed device is a rebuilding device.

Add catching double degraded to degraded transition. Migration is
finished but map state doesn't change, array is still degraded.

Update failed_disk_num correctly. If double degradation
happens rebuild will start on the lowest slot, but this variable points
to the first failed slot. If second fail happens while rebuild this
variable shouldn't be updated until rebuild is not finished.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

0007 Assemble mask FAILFAST and WRITEMOSTLY flags when fi.patch | (download)

Assemble.c | 5 4 + 1 - 0 !
1 file changed, 4 insertions(+), 1 deletion(-)

 [patch 07/11] assemble: mask failfast and writemostly flags when
 finding the most recent device

If devices[].i.disk.state has MD_DISK_FAILFAST or MD_DISK_WRITEMOSTLY
flag, it cannot be the most recent device. Both flags should be masked
before checking the state.

0008 Grow avoid overflow in compute_backup_blocks.patch | (download)

Grow.c | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 [patch 08/11] grow: avoid overflow in compute_backup_blocks()

With a chunk size of 16Meg and data drive count of 8,
this calculate can easily overflow the 'int' type that
is used for the multiplications.
So force it to use "long" instead.

Reported-and-tested-by: Ed Spiridonov <edo.rus@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

0009 Grow report correct new chunk size.patch | (download)

Grow.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 09/11] grow: report correct new chunk size.

When using "--grow --chunk=" to change chunk
size, the old chunksize is reported instead of the new.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

0010 policy.c prevent NULL pointer referencing.patch | (download)

policy.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 10/11] policy.c: prevent null pointer referencing

paths could be NULL and paths[0] should be followed by NULL pointer
checking.

0011 policy.c Fix for compiler error.patch | (download)

policy.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 11/11] policy.c: fix for compiler error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

After cd72f9d(policy: support devices with multiple paths.) compilation
on old compilers fails because "ā€˜pā€™ may be used uninitialized
in this function".

Initialize it with NULL to prevent this.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>

debian conffile location.diff | (download)

Makefile | 4 2 + 2 - 0 !
ReadMe.c | 2 1 + 1 - 0 !
mdadm.8.in | 16 8 + 8 - 0 !
mdadm.conf.5 | 2 1 + 1 - 0 !
4 files changed, 12 insertions(+), 12 deletions(-)

 set /etc/mdadm/mdadm.conf as primary config file location

On Debian, the configuration file resides primarily in /etc/mdadm/mdadm.conf,
/etc/mdadm.conf is only used as a backup.

This is a Debian-specific patch.

debian no Werror.diff | (download)

Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 remove -werror from compiler flags

-Werror seems like a bad idea on released/packaged code because a toolchain
update (introducing new warnings) could break the build. We'll let upstream
use it to beautify the code, but remove it for out builds.

Signed-off-by: martin f. krafft <madduck@debian.org>


sha1 includes.diff | (download)

sha1.h | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

 do not #include ansidecl.h from sha1.h, use system headers

In 3.2.5 version of mdadm, new sha1 implementation has been included
which tries to include ansidecl.h header which is internal to some
other project.  But this #include isn't really necessary, since this
implementation does not actually use any defines from ansidecl.h.  So
just remove the #include, instead of adding a new external dependency.

References: http://www.spinics.net/lists/raid/msg38859.html

While at it, unconditionally include system headers like limits.h and
stdint.h, since on a Linux system these headers are available, and
these contains definitive information about real system types than
any guesses.


readlink path.patch | (download)

udev-md-raid-arrays.rules | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 readlink is in /bin not /usr/bin on debian
Date: Fri, 14 Nov 2014 19:11:51 +0300
Bug-Debian: http://bugs.debian.org/766416
mdmonitor service simplify.diff | (download)

systemd/mdmonitor.service | 5 1 + 4 - 0 !
1 file changed, 1 insertion(+), 4 deletions(-)

 simplify mdmonitor.service