diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2023-03-16 16:49:57 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-23 22:45:33 +0000 |
commit | c69fb7bfe427ea5adc64b1d453547a6e496bf55e (patch) | |
tree | 4df6d30b4281e0abdb50ebf9fb35e11304f216eb /meta/recipes-extended | |
parent | c0cf98d59cf3b3446613a5778b28db17512ebf9a (diff) | |
download | poky-c69fb7bfe427ea5adc64b1d453547a6e496bf55e.tar.gz |
mdadm: Fix testcase 06wrmostly
Backport patch [1] to fix the failure of the 06wrmostly test.
[1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=41edf6f45895193f4a523cb0a08d639c9ff9ccc9
(From OE-Core rev: 9c73484cb12f39662a8f10027a55c63b95373066)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/mdadm/files/0001-mdadm-Fix-optional-write-behind-parameter.patch | 45 | ||||
-rw-r--r-- | meta/recipes-extended/mdadm/mdadm_4.2.bb | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-Fix-optional-write-behind-parameter.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-Fix-optional-write-behind-parameter.patch new file mode 100644 index 0000000000..186d1e76f2 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-Fix-optional-write-behind-parameter.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 41edf6f45895193f4a523cb0a08d639c9ff9ccc9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:12 -0600 | ||
4 | Subject: [PATCH] mdadm: Fix optional --write-behind parameter | ||
5 | |||
6 | The commit noted below changed the behaviour of --write-behind to | ||
7 | require an argument. This broke the 06wrmostly test with the error: | ||
8 | |||
9 | mdadm: Invalid value for maximum outstanding write-behind writes: (null). | ||
10 | Must be between 0 and 16383. | ||
11 | |||
12 | To fix this, check if optarg is NULL before parising it, as the origial | ||
13 | code did. | ||
14 | |||
15 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=41edf6f45895193f4a523cb0a08d639c9ff9ccc9] | ||
16 | |||
17 | Fixes: 60815698c0ac ("Refactor parse_num and use it to parse optarg.") | ||
18 | Cc: Mateusz Grzonka <mateusz.grzonka@intel.com> | ||
19 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
20 | Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | ||
21 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
22 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
23 | --- | ||
24 | mdadm.c | 5 +++-- | ||
25 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/mdadm.c b/mdadm.c | ||
28 | index d0c5e6de..56722ed9 100644 | ||
29 | --- a/mdadm.c | ||
30 | +++ b/mdadm.c | ||
31 | @@ -1201,8 +1201,9 @@ int main(int argc, char *argv[]) | ||
32 | case O(BUILD, WriteBehind): | ||
33 | case O(CREATE, WriteBehind): | ||
34 | s.write_behind = DEFAULT_MAX_WRITE_BEHIND; | ||
35 | - if (parse_num(&s.write_behind, optarg) != 0 || | ||
36 | - s.write_behind < 0 || s.write_behind > 16383) { | ||
37 | + if (optarg && | ||
38 | + (parse_num(&s.write_behind, optarg) != 0 || | ||
39 | + s.write_behind < 0 || s.write_behind > 16383)) { | ||
40 | pr_err("Invalid value for maximum outstanding write-behind writes: %s.\n\tMust be between 0 and 16383.\n", | ||
41 | optarg); | ||
42 | exit(2); | ||
43 | -- | ||
44 | 2.25.1 | ||
45 | |||
diff --git a/meta/recipes-extended/mdadm/mdadm_4.2.bb b/meta/recipes-extended/mdadm/mdadm_4.2.bb index 19035caaec..be08d512d7 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.2.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.2.bb | |||
@@ -24,6 +24,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ | |||
24 | file://0001-mdadm-skip-test-11spare-migration.patch \ | 24 | file://0001-mdadm-skip-test-11spare-migration.patch \ |
25 | file://0001-Fix-parsing-of-r-in-monitor-manager-mode.patch \ | 25 | file://0001-Fix-parsing-of-r-in-monitor-manager-mode.patch \ |
26 | file://0001-Makefile-install-mdcheck.patch \ | 26 | file://0001-Makefile-install-mdcheck.patch \ |
27 | file://0001-mdadm-Fix-optional-write-behind-parameter.patch \ | ||
27 | " | 28 | " |
28 | 29 | ||
29 | SRC_URI[sha256sum] = "461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d" | 30 | SRC_URI[sha256sum] = "461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d" |