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
71 lines
2.5 KiB
Diff
71 lines
2.5 KiB
Diff
From 1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da Mon Sep 17 00:00:00 2001
|
|
From: Blazej Kucman <blazej.kucman@intel.com>
|
|
Date: Fri, 17 Jan 2020 15:24:04 +0100
|
|
Subject: [PATCH] imsm: fill working_disks according to metadata.
|
|
Git-commit: 1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da
|
|
Patch-mainline: mdadm-4.1+
|
|
References: jsc#SLE-10078, jsc#SLE-9348
|
|
|
|
Imsm tracks as "working_disk" each visible drive.
|
|
Assemble routine expects that the value will return count
|
|
of active member drives recorded in metadata.
|
|
As a side effect "--no-degraded" doesn't work correctly for imsm.
|
|
Align this field to others.
|
|
Added check, if the option --no-degraded is called with --scan.
|
|
|
|
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
|
|
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
Signed-off-by: Coly Li <colyli@suse.de>
|
|
|
|
---
|
|
mdadm.c | 9 ++++++---
|
|
super-intel.c | 5 ++---
|
|
2 files changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/mdadm.c b/mdadm.c
|
|
index 256a97e..13dc24e 100644
|
|
--- a/mdadm.c
|
|
+++ b/mdadm.c
|
|
@@ -1485,9 +1485,12 @@ int main(int argc, char *argv[])
|
|
rv = Manage_stop(devlist->devname, mdfd, c.verbose, 0);
|
|
break;
|
|
case ASSEMBLE:
|
|
- if (devs_found == 1 && ident.uuid_set == 0 &&
|
|
- ident.super_minor == UnSet && ident.name[0] == 0 &&
|
|
- !c.scan ) {
|
|
+ if (!c.scan && c.runstop == -1) {
|
|
+ pr_err("--no-degraded not meaningful without a --scan assembly.\n");
|
|
+ exit(1);
|
|
+ } else if (devs_found == 1 && ident.uuid_set == 0 &&
|
|
+ ident.super_minor == UnSet && ident.name[0] == 0 &&
|
|
+ !c.scan) {
|
|
/* Only a device has been given, so get details from config file */
|
|
struct mddev_ident *array_ident = conf_get_ident(devlist->devname);
|
|
if (array_ident == NULL) {
|
|
diff --git a/super-intel.c b/super-intel.c
|
|
index 5c1f759..47809bc 100644
|
|
--- a/super-intel.c
|
|
+++ b/super-intel.c
|
|
@@ -7946,7 +7946,8 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
|
|
skip = 1;
|
|
if (!skip && (ord & IMSM_ORD_REBUILD))
|
|
recovery_start = 0;
|
|
-
|
|
+ if (!(ord & IMSM_ORD_REBUILD))
|
|
+ this->array.working_disks++;
|
|
/*
|
|
* if we skip some disks the array will be assmebled degraded;
|
|
* reset resync start to avoid a dirty-degraded
|
|
@@ -7988,8 +7989,6 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
|
|
else
|
|
this->array.spare_disks++;
|
|
}
|
|
- if (info_d->recovery_start == MaxSector)
|
|
- this->array.working_disks++;
|
|
|
|
info_d->events = __le32_to_cpu(mpb->generation_num);
|
|
info_d->data_offset = pba_of_lba0(map);
|
|
--
|
|
2.25.0
|
|
|