2e35d7583b
- Update for latest mdadm-4.1+ patches, this is required by jsc#SLE-10078 and jsc#SLE-9348. Mostly the purpose is for latest Intel IMSM raid support. The following patches also include previous patches with new re-ordered prefix numbers. - Makefile: install mdadm_env.sh to /usr/lib/mdadm (bsc#1111960) 0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch - Assemble: keep MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flag (jsc#SLE-10078, jsc#SLE-9348) 0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch - Document PART-POLICY lines (jsc#SLE-10078, jsc#SLE-9348) 0002-Document-PART-POLICY-lines.patc - policy: support devices with multiple paths. (jsc#SLE-10078, jsc#SLE-9348) 0003-policy-support-devices-with-multiple-paths.patch - mdcheck: add systemd unit files to run mdcheck. (bsc#1115407) 0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch - Monitor: add system timer to run --oneshot periodically (bsc#1115407) 0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch - imsm: update metadata correctly while raid10 double (jsc#SLE-10078, jsc#SLE-9348) 0006-imsm-update-metadata-correctly-while-raid10-double-d.patch - Assemble: mask FAILFAST and WRITEMOSTLY flags when finding (jsc#SLE-10078, jsc#SLE-9348) 0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch - Grow: avoid overflow in compute_backup_blocks() (jsc#SLE-10078, jsc#SLE-9348) 0008-Grow-avoid-overflow-in-compute_backup_blocks.patch - Grow: report correct new chunk size. (jsc#SLE-10078, jsc#SLE-9348) 0009-Grow-report-correct-new-chunk-size.patch OBS-URL: https://build.opensuse.org/request/show/781064 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=181
83 lines
2.2 KiB
Diff
83 lines
2.2 KiB
Diff
From 6b6112842030309c297a521918d1a2e982426fa3 Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.com>
|
|
Date: Fri, 9 Nov 2018 17:12:33 +1100
|
|
Subject: [PATCH 1/5] Document PART-POLICY lines
|
|
Git-commit: 6b6112842030309c297a521918d1a2e982426fa3
|
|
Patch-mainline: mdadm-4.1+
|
|
References: jsc#SLE-10078, jsc#SLE-9348
|
|
|
|
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>
|
|
Signed-off-by: Coly Li <colyli@suse.de>
|
|
|
|
---
|
|
mdadm.conf.5 | 24 +++++++++++++++++++++++-
|
|
policy.c | 2 +-
|
|
2 files changed, 24 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/mdadm.conf.5 b/mdadm.conf.5
|
|
index 18512cb0ec7e..47c962ab2071 100644
|
|
--- a/mdadm.conf.5
|
|
+++ b/mdadm.conf.5
|
|
@@ -501,7 +501,7 @@ To update hot plug configuration it is necessary to execute
|
|
.B mdadm \-\-udev\-rules
|
|
command after changing the config file
|
|
|
|
-Key words used in the
|
|
+Keywords used in the
|
|
.I POLICY
|
|
line and supported values are:
|
|
|
|
@@ -565,6 +565,28 @@ be automatically added to that array (or it's container)
|
|
as above and the disk will become a spare in remaining cases
|
|
.RE
|
|
|
|
+.TP
|
|
+.B PART-POLICY
|
|
+This is similar to
|
|
+.B POLICY
|
|
+and accepts the same keyword assignments. It allows a consistent set
|
|
+of policies to applied to each of the partitions of a device.
|
|
+
|
|
+A
|
|
+.B PART-POLICY
|
|
+line should set
|
|
+.I type=disk
|
|
+and identify the path to one or more disk devices. Each partition on
|
|
+these disks will be treated according to the
|
|
+.I action=
|
|
+setting from this line. If a
|
|
+.I domain
|
|
+is set in the line, then the domain associated with each patition will
|
|
+be based on the domain, but with
|
|
+.RB \(dq -part N\(dq
|
|
+appended, when N is the partition number for the partition that was
|
|
+found.
|
|
+
|
|
.SH EXAMPLE
|
|
DEVICE /dev/sd[bcdjkl]1
|
|
.br
|
|
diff --git a/policy.c b/policy.c
|
|
index c0d18a7eca5b..258f39317951 100644
|
|
--- a/policy.c
|
|
+++ b/policy.c
|
|
@@ -300,7 +300,7 @@ static int path_has_part(char *path, char **part)
|
|
l--;
|
|
if (l < 5 || strncmp(path+l-5, "-part", 5) != 0)
|
|
return 0;
|
|
- *part = path+l-4;
|
|
+ *part = path+l-5;
|
|
return 1;
|
|
}
|
|
|
|
--
|
|
2.14.0.rc0.dirty
|
|
|