Debian Patches

Status for mdadm/4.1-11

Patch Description Author Forwarded Bugs Origin Last update
0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch [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.
Gioh Kim <gi-oh.kim@profitbricks.com> no 2018-11-06
0002-Document-PART-POLICY-lines.patch [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.
NeilBrown <neilb@suse.com> no 2018-11-09
0003-policy-support-devices-with-multiple-paths.patch [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.
NeilBrown <neilb@suse.com> no 2018-11-09
0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch [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.
NeilBrown <neilb@suse.com> no 2018-12-05
0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch [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.
NeilBrown <neilb@suse.com> no 2018-12-05
0006-imsm-update-metadata-correctly-while-raid10-double-d.patch [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.
Mariusz Tkaczyk <mariusz.tkaczyk@intel.com> no 2018-10-17
0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch [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.
Gioh Kim <gi-oh.kim@cloud.ionos.com> no 2018-11-06
0008-Grow-avoid-overflow-in-compute_backup_blocks.patch [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.
NeilBrown <neilb@suse.com> no 2018-12-06
0009-Grow-report-correct-new-chunk-size.patch [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.
NeilBrown <neilb@suse.com> no 2018-12-06
0010-policy.c-prevent-NULL-pointer-referencing.patch [PATCH 10/11] policy.c: prevent NULL pointer referencing
paths could be NULL and paths[0] should be followed by NULL pointer
checking.
Gioh Kim <gi-oh.kim@cloud.ionos.com> no 2018-12-07
0011-policy.c-Fix-for-compiler-error.patch [PATCH 11/11] policy.c: Fix for compiler error
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.
Mariusz Tkaczyk <mariusz.tkaczyk@intel.com> no 2018-12-11
debian-conffile-location.diff 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.
martin f. krafft <madduck@debian.org> not-needed
debian-no-Werror.diff 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.
martin f. krafft <madduck@debian.org> no
sha1-includes.diff 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.


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.
Michael Tokarev <mjt@tls.msk.ru> no
readlink-path.patch readlink is in /bin not /usr/bin on debian
This is a debian-specific change, upstream ships
the rule to use /usr/bin/readlink while on debian
it is /bin/readlink
Michael Tokarev <mjt@tls.msk.ru> no debian 2014-11-14
mdmonitor-service-simplify.diff simplify mdmonitor.service
There isn't much for customization for mdadm --monitor.
it'll just do what it's supposed to do, so just run it.
Michael Tokarev <mjt@tls.msk.ru> no debian 2014-11-14
0001-Create-add-support-for-RAID0-layouts.patch [PATCH 1/2] Create: add support for RAID0 layouts.
Since Linux 5.4 a layout is needed for RAID0 arrays with
varying device sizes.
This patch makes the layout of an array visible (via --examine)
and sets the layout on newly created arrays.
--layout=dangerous
can be used to avoid setting a layout so that they array
can be used on older kernels.



diff --git a/Create.c b/Create.c
index 292f92a9..6f84e5b0 100644
NeilBrown <neilb@suse.de> no debian 2019-11-04
0002-Assemble-add-support-for-RAID0-layouts.patch [PATCH 2/2] Assemble: add support for RAID0 layouts.
If you have a RAID0 array with varying sized devices
on a kernel before 5.4, you cannot assembling it on
5.4 or later without explicitly setting the layout.
This is now possible with
--update=layout-original (For 3.13 and earlier kernels)
or
--update=layout-alternate (for 3.14 and later kernels)



diff --git a/Assemble.c b/Assemble.c
index b2e69144..6b5a7c8e 100644
NeilBrown <neilb@suse.de> no debian 2019-11-04
0001-Respect-CROSS_COMPILE-when-CC-is-the-default.patch [PATCH] Respect $(CROSS_COMPILE) when $(CC) is the default
Commit 1180ed5 told make to only respect $(CROSS_COMPILE) when $(CC)
was unset. But that will never be the case, as make provides
a default value for $(CC). Change this logic to respect $(CROSS_COMPILE)
when $(CC) is the default. Patch originally by Helmet Grohne.



===================================================================
dann frazier <dann.frazier@canonical.com> no debian 2019-12-09
fix-manpages.patch Fix typos and macro issues in manpages Felix Lechner <felix.lechner@lease-up.com> no debian
typos-in-programs.patch Typos in programs Felix Lechner <felix.lechner@lease-up.com> no
documentation-keys-in-service-files.patch Make adjustments to systemd files provided by upstream Felix Lechner <felix.lechner@lease-up.com> no
fix-command-line-help.patch Make command-line help consistent with manual page. Mode was missing. Felix Lechner <felix.lechner@lease-up.com> no debian
strcat-look-for-md-device-in-dev-md.patch Look for md device in /dev/md Martin Mares <mj@ucw.cz> no debian
exit-gracefully-when-md-device-not-found.patch Exit gracefully when md device not found Felix Lechner <felix.lechner@lease-up.com> no debian
lp-1847924-introduce-new-array-state-broken.patch Introduce new array state 'broken' for raid0/linear
Currently if a md raid0/linear array gets one or more members removed while
being mounted, kernel keeps showing state 'clean' in the 'array_state'
sysfs attribute. Despite udev signaling the member device is gone, 'mdadm'
cannot issue the STOP_ARRAY ioctl successfully, given the array is mounted.

Nothing else hints that something is wrong (except that the removed devices
don't show properly in the output of mdadm 'detail' command). There is no
other property to be checked, and if user is not performing reads/writes
to the array, even kernel log is quiet and doesn't give a clue about the
missing member.

This patch is the mdadm counterpart of kernel new array state 'broken'.
The 'broken' state mimics the state 'clean' in every aspect, being useful
only to distinguish if an array has some member missing. All necessary
paths in mdadm were changed to deal with 'broken' state, and in case the
tool runs in a kernel that is not updated, it'll work normally, i.e., it
doesn't require the 'broken' state in order to work.
Also, this patch changes the way the array state is showed in the 'detail'
command (for raid0/linear only) - now it takes the 'array_state' sysfs
attribute into account instead of only rely in the MD_SB_CLEAN flag.

git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=cb77f8c598ede2b7efec23f899b1cda44c315195
Guilherme G. Piccoli <gpiccoli@canonical.com> no upstream, 2019-10-13
test-installed.patch Test installed files The test suite seems to check the executable bit on the local build product
'mdadm' but runs all programs from the system PATH. This change should test
the installed version.
.
I believe this change tests the installed version, but that hypothesis is not
supported by much else. The autopkgtest restriction isolation-machine made it
difficult so far to run the test suite anywhere.
.
The entire setup is untested and may require further modification in order to
function.
.
Incorporates a suggestion from the fdisk maintainer to specify the fdisk
prerequisite explicitly.
Felix Lechner <felix.lechner@lease-up.com> not-needed debian

All known versions for source package 'mdadm'

Links