mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 06:32:34 +02:00
mdadm: fix testcase 00multipath failure
After upgrade to 4.2, mdadm's testcase 00multipath failed, because a bug in 4.2 makes "-r" not work in manage mode. (From OE-Core rev: 8a815877b0fac30f379a7387966b8a0c7ffe753e) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7faaaf1425
commit
95870c10b1
@@ -0,0 +1,74 @@
|
||||
From 969fbb35e40100f599d4a9781911251f21792698 Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Thu, 27 Jan 2022 17:53:01 +0800
|
||||
Subject: [PATCH] Fix parsing of "-r" in monitor/manager mode
|
||||
|
||||
This revert commit 546047688e1 [mdadm: fix coredump of mdadm --monitor
|
||||
-r], and fix the coredump issue of 'mdadm --monitor -r'.
|
||||
|
||||
commit 546047688e1 make -r not work in manager mode, and testcase
|
||||
00multipath failed.
|
||||
|
||||
Upstream-Status: Submitted [send to maintainer jsorensen@fb.com]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
|
||||
---
|
||||
ReadMe.c | 8 +++++---
|
||||
mdadm.c | 2 ++
|
||||
mdadm.h | 1 +
|
||||
3 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ReadMe.c b/ReadMe.c
|
||||
index 8139976..070eea5 100644
|
||||
--- a/ReadMe.c
|
||||
+++ b/ReadMe.c
|
||||
@@ -81,11 +81,13 @@ char Version[] = "mdadm - v" VERSION " - " VERS_DATE EXTRAVERSION "\n";
|
||||
* found, it is started.
|
||||
*/
|
||||
|
||||
-char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:r:n:x:u:c:d:z:U:N:safRSow1tye:k";
|
||||
+char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:";
|
||||
char short_bitmap_options[]=
|
||||
- "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sarfRSow1tye:k:";
|
||||
+ "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:";
|
||||
char short_bitmap_auto_options[]=
|
||||
- "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:";
|
||||
+ "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:";
|
||||
+char short_increment_options[]=
|
||||
+ "-ABCDEFGIQhVXYWZ:vqbc:i:l:r:p:m:n:x:u:c:d:z:U:N:safRSow1tye:k:";
|
||||
|
||||
struct option long_options[] = {
|
||||
{"manage", 0, 0, ManageOpt},
|
||||
diff --git a/mdadm.c b/mdadm.c
|
||||
index 26299b2..2a3b2ee 100644
|
||||
--- a/mdadm.c
|
||||
+++ b/mdadm.c
|
||||
@@ -227,6 +227,7 @@ int main(int argc, char *argv[])
|
||||
shortopt = short_bitmap_auto_options;
|
||||
break;
|
||||
case 'F': newmode = MONITOR;
|
||||
+ shortopt = short_increment_options;
|
||||
break;
|
||||
case 'G': newmode = GROW;
|
||||
shortopt = short_bitmap_options;
|
||||
@@ -268,6 +269,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
case NoSharing:
|
||||
newmode = MONITOR;
|
||||
+ shortopt = short_increment_options;
|
||||
break;
|
||||
}
|
||||
if (mode && newmode == mode) {
|
||||
diff --git a/mdadm.h b/mdadm.h
|
||||
index ecfc137..42148dd 100644
|
||||
--- a/mdadm.h
|
||||
+++ b/mdadm.h
|
||||
@@ -421,6 +421,7 @@ enum mode {
|
||||
extern char short_options[];
|
||||
extern char short_bitmap_options[];
|
||||
extern char short_bitmap_auto_options[];
|
||||
+extern char short_increment_options[];
|
||||
extern struct option long_options[];
|
||||
extern char Version[], Usage[], Help[], OptionHelp[],
|
||||
*mode_help[],
|
||||
@@ -22,6 +22,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
|
||||
file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
|
||||
file://include_sysmacros.patch \
|
||||
file://0001-mdadm-skip-test-11spare-migration.patch \
|
||||
file://0001-Fix-parsing-of-r-in-monitor-manager-mode.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d"
|
||||
|
||||
Reference in New Issue
Block a user