diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2024-03-13 18:33:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-04-16 08:07:01 +0100 |
commit | df4a6bcb156677165318d397b0bb8fbd24408231 (patch) | |
tree | 8b15f0d53f4665a26d0d1f2298c1478c26b45ad2 /meta/recipes-extended | |
parent | 352e2a327b6647afd0fee2399c33953fc99ba4e9 (diff) | |
download | poky-df4a6bcb156677165318d397b0bb8fbd24408231.tar.gz |
mdadm: update 4.2 -> 4.3
Drop a gigantic set of patches: either backports or
test fixups (which are no longer testable after exclusion of
mdadm from ptests).
Add musl fixes:
0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch
0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch
(From OE-Core rev: 952a2a94901ea6e9416e517e9f6c97dbc7e3bb2d)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
30 files changed, 160 insertions, 1609 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch b/meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch deleted file mode 100644 index cea435f83b..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | From ca458f4dcc4de9403298f67543466ce4bbc8f8ae Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:07 -0600 | ||
4 | Subject: [PATCH 1/4] DDF: Cleanup validate_geometry_ddf_container() | ||
5 | |||
6 | Move the function up so that the function declaration is not necessary | ||
7 | and remove the unused arguments to the function. | ||
8 | |||
9 | No functional changes are intended but will help with a bug fix in the | ||
10 | next patch. | ||
11 | |||
12 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
13 | Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | ||
14 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | |||
18 | Reference to upstream patch: | ||
19 | https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=679bd9508a30 | ||
20 | |||
21 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
22 | --- | ||
23 | super-ddf.c | 88 ++++++++++++++++++++++++----------------------------- | ||
24 | 1 file changed, 39 insertions(+), 49 deletions(-) | ||
25 | |||
26 | diff --git a/super-ddf.c b/super-ddf.c | ||
27 | index 3f304cd..65cf727 100644 | ||
28 | --- a/super-ddf.c | ||
29 | +++ b/super-ddf.c | ||
30 | @@ -503,13 +503,6 @@ struct ddf_super { | ||
31 | static int load_super_ddf_all(struct supertype *st, int fd, | ||
32 | void **sbp, char *devname); | ||
33 | static int get_svd_state(const struct ddf_super *, const struct vcl *); | ||
34 | -static int | ||
35 | -validate_geometry_ddf_container(struct supertype *st, | ||
36 | - int level, int layout, int raiddisks, | ||
37 | - int chunk, unsigned long long size, | ||
38 | - unsigned long long data_offset, | ||
39 | - char *dev, unsigned long long *freesize, | ||
40 | - int verbose); | ||
41 | |||
42 | static int validate_geometry_ddf_bvd(struct supertype *st, | ||
43 | int level, int layout, int raiddisks, | ||
44 | @@ -3322,6 +3315,42 @@ static int reserve_space(struct supertype *st, int raiddisks, | ||
45 | return 1; | ||
46 | } | ||
47 | |||
48 | +static int | ||
49 | +validate_geometry_ddf_container(struct supertype *st, | ||
50 | + int level, int raiddisks, | ||
51 | + unsigned long long data_offset, | ||
52 | + char *dev, unsigned long long *freesize, | ||
53 | + int verbose) | ||
54 | +{ | ||
55 | + int fd; | ||
56 | + unsigned long long ldsize; | ||
57 | + | ||
58 | + if (level != LEVEL_CONTAINER) | ||
59 | + return 0; | ||
60 | + if (!dev) | ||
61 | + return 1; | ||
62 | + | ||
63 | + fd = dev_open(dev, O_RDONLY|O_EXCL); | ||
64 | + if (fd < 0) { | ||
65 | + if (verbose) | ||
66 | + pr_err("ddf: Cannot open %s: %s\n", | ||
67 | + dev, strerror(errno)); | ||
68 | + return 0; | ||
69 | + } | ||
70 | + if (!get_dev_size(fd, dev, &ldsize)) { | ||
71 | + close(fd); | ||
72 | + return 0; | ||
73 | + } | ||
74 | + close(fd); | ||
75 | + if (freesize) { | ||
76 | + *freesize = avail_size_ddf(st, ldsize >> 9, INVALID_SECTORS); | ||
77 | + if (*freesize == 0) | ||
78 | + return 0; | ||
79 | + } | ||
80 | + | ||
81 | + return 1; | ||
82 | +} | ||
83 | + | ||
84 | static int validate_geometry_ddf(struct supertype *st, | ||
85 | int level, int layout, int raiddisks, | ||
86 | int *chunk, unsigned long long size, | ||
87 | @@ -3347,11 +3376,9 @@ static int validate_geometry_ddf(struct supertype *st, | ||
88 | level = LEVEL_CONTAINER; | ||
89 | if (level == LEVEL_CONTAINER) { | ||
90 | /* Must be a fresh device to add to a container */ | ||
91 | - return validate_geometry_ddf_container(st, level, layout, | ||
92 | - raiddisks, *chunk, | ||
93 | - size, data_offset, dev, | ||
94 | - freesize, | ||
95 | - verbose); | ||
96 | + return validate_geometry_ddf_container(st, level, raiddisks, | ||
97 | + data_offset, dev, | ||
98 | + freesize, verbose); | ||
99 | } | ||
100 | |||
101 | if (!dev) { | ||
102 | @@ -3449,43 +3476,6 @@ static int validate_geometry_ddf(struct supertype *st, | ||
103 | return 1; | ||
104 | } | ||
105 | |||
106 | -static int | ||
107 | -validate_geometry_ddf_container(struct supertype *st, | ||
108 | - int level, int layout, int raiddisks, | ||
109 | - int chunk, unsigned long long size, | ||
110 | - unsigned long long data_offset, | ||
111 | - char *dev, unsigned long long *freesize, | ||
112 | - int verbose) | ||
113 | -{ | ||
114 | - int fd; | ||
115 | - unsigned long long ldsize; | ||
116 | - | ||
117 | - if (level != LEVEL_CONTAINER) | ||
118 | - return 0; | ||
119 | - if (!dev) | ||
120 | - return 1; | ||
121 | - | ||
122 | - fd = dev_open(dev, O_RDONLY|O_EXCL); | ||
123 | - if (fd < 0) { | ||
124 | - if (verbose) | ||
125 | - pr_err("ddf: Cannot open %s: %s\n", | ||
126 | - dev, strerror(errno)); | ||
127 | - return 0; | ||
128 | - } | ||
129 | - if (!get_dev_size(fd, dev, &ldsize)) { | ||
130 | - close(fd); | ||
131 | - return 0; | ||
132 | - } | ||
133 | - close(fd); | ||
134 | - if (freesize) { | ||
135 | - *freesize = avail_size_ddf(st, ldsize >> 9, INVALID_SECTORS); | ||
136 | - if (*freesize == 0) | ||
137 | - return 0; | ||
138 | - } | ||
139 | - | ||
140 | - return 1; | ||
141 | -} | ||
142 | - | ||
143 | static int validate_geometry_ddf_bvd(struct supertype *st, | ||
144 | int level, int layout, int raiddisks, | ||
145 | int *chunk, unsigned long long size, | ||
146 | -- | ||
147 | 2.39.1 | ||
148 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch b/meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch deleted file mode 100644 index 9e3a30be23..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 82c893bb9e01f914a6bdef1bef943af746cfc3e1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 15 Jan 2023 12:42:18 -0800 | ||
4 | Subject: [PATCH] Define alignof using _Alignof when using C11 or newer | ||
5 | |||
6 | WG14 N2350 made very clear that it is an UB having type definitions | ||
7 | within "offsetof" [1]. This patch enhances the implementation of macro | ||
8 | alignof_slot to use builtin "_Alignof" to avoid undefined behavior on | ||
9 | when using std=c11 or newer | ||
10 | |||
11 | clang 16+ has started to flag this [2] | ||
12 | |||
13 | Fixes build when using -std >= gnu11 and using clang16+ | ||
14 | |||
15 | Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it | ||
16 | may support C11, exclude those compilers too | ||
17 | |||
18 | [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm | ||
19 | [2] https://reviews.llvm.org/D133574 | ||
20 | |||
21 | Upstream-Status: Submitted [https://lore.kernel.org/linux-raid/20230118083236.24418-1-raj.khem@gmail.com/T/#u] | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | sha1.c | 12 +++++++++++- | ||
25 | 1 file changed, 11 insertions(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/sha1.c b/sha1.c | ||
28 | index 89b32f4..1e4ad5d 100644 | ||
29 | --- a/sha1.c | ||
30 | +++ b/sha1.c | ||
31 | @@ -229,7 +229,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) | ||
32 | if (len >= 64) | ||
33 | { | ||
34 | #if !_STRING_ARCH_unaligned | ||
35 | -# define alignof(type) offsetof (struct { char c; type x; }, x) | ||
36 | +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 | ||
37 | + <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. | ||
38 | + clang versions < 8.0.0 have the same bug. */ | ||
39 | +# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ | ||
40 | + || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ | ||
41 | + && !defined __clang__) \ | ||
42 | + || (defined __clang__ && __clang_major__ < 8)) | ||
43 | +# define alignof(type) offsetof (struct { char c; type x; }, x) | ||
44 | +# else | ||
45 | +# define alignof(type) _Alignof(type) | ||
46 | +# endif | ||
47 | # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0) | ||
48 | if (UNALIGNED_P (buffer)) | ||
49 | while (len > 64) | ||
50 | -- | ||
51 | 2.39.0 | ||
52 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch b/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch deleted file mode 100644 index 3fb46cc60a..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | From 969fbb35e40100f599d4a9781911251f21792698 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 27 Jan 2022 17:53:01 +0800 | ||
4 | Subject: [PATCH] Fix parsing of "-r" in monitor/manager mode | ||
5 | |||
6 | This revert commit 546047688e1 [mdadm: fix coredump of mdadm --monitor | ||
7 | -r], and fix the coredump issue of 'mdadm --monitor -r'. | ||
8 | |||
9 | commit 546047688e1 make -r not work in manager mode, and testcase | ||
10 | 00multipath failed. | ||
11 | |||
12 | Upstream-Status: Submitted [send to maintainer jsorensen@fb.com] | ||
13 | |||
14 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
15 | |||
16 | --- | ||
17 | ReadMe.c | 8 +++++--- | ||
18 | mdadm.c | 2 ++ | ||
19 | mdadm.h | 1 + | ||
20 | 3 files changed, 8 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/ReadMe.c b/ReadMe.c | ||
23 | index 8139976..070eea5 100644 | ||
24 | --- a/ReadMe.c | ||
25 | +++ b/ReadMe.c | ||
26 | @@ -81,11 +81,13 @@ char Version[] = "mdadm - v" VERSION " - " VERS_DATE EXTRAVERSION "\n"; | ||
27 | * found, it is started. | ||
28 | */ | ||
29 | |||
30 | -char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:r:n:x:u:c:d:z:U:N:safRSow1tye:k"; | ||
31 | +char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; | ||
32 | char short_bitmap_options[]= | ||
33 | - "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; | ||
34 | + "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; | ||
35 | char short_bitmap_auto_options[]= | ||
36 | - "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; | ||
37 | + "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; | ||
38 | +char short_increment_options[]= | ||
39 | + "-ABCDEFGIQhVXYWZ:vqbc:i:l:r:p:m:n:x:u:c:d:z:U:N:safRSow1tye:k:"; | ||
40 | |||
41 | struct option long_options[] = { | ||
42 | {"manage", 0, 0, ManageOpt}, | ||
43 | diff --git a/mdadm.c b/mdadm.c | ||
44 | index 26299b2..2a3b2ee 100644 | ||
45 | --- a/mdadm.c | ||
46 | +++ b/mdadm.c | ||
47 | @@ -227,6 +227,7 @@ int main(int argc, char *argv[]) | ||
48 | shortopt = short_bitmap_auto_options; | ||
49 | break; | ||
50 | case 'F': newmode = MONITOR; | ||
51 | + shortopt = short_increment_options; | ||
52 | break; | ||
53 | case 'G': newmode = GROW; | ||
54 | shortopt = short_bitmap_options; | ||
55 | @@ -268,6 +269,7 @@ int main(int argc, char *argv[]) | ||
56 | |||
57 | case NoSharing: | ||
58 | newmode = MONITOR; | ||
59 | + shortopt = short_increment_options; | ||
60 | break; | ||
61 | } | ||
62 | if (mode && newmode == mode) { | ||
63 | diff --git a/mdadm.h b/mdadm.h | ||
64 | index ecfc137..42148dd 100644 | ||
65 | --- a/mdadm.h | ||
66 | +++ b/mdadm.h | ||
67 | @@ -421,6 +421,7 @@ enum mode { | ||
68 | extern char short_options[]; | ||
69 | extern char short_bitmap_options[]; | ||
70 | extern char short_bitmap_auto_options[]; | ||
71 | +extern char short_increment_options[]; | ||
72 | extern struct option long_options[]; | ||
73 | extern char Version[], Usage[], Help[], OptionHelp[], | ||
74 | *mode_help[], | ||
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch index 298f276cd6..fa1f0aa520 100644 --- a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch +++ b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a9166bf422da1001bac9cc819386bf39b7cd1b73 Mon Sep 17 00:00:00 2001 | 1 | From 76856a34a4e339e4a53b09d028f89fcc520e3127 Mon Sep 17 00:00:00 2001 |
2 | From: "Maxin B. John" <maxin.john@intel.com> | 2 | From: "Maxin B. John" <maxin.john@intel.com> |
3 | Date: Tue, 9 Feb 2016 11:44:01 +0200 | 3 | Date: Tue, 9 Feb 2016 11:44:01 +0200 |
4 | Subject: [PATCH] Fix the path of corosync and dlm header files check | 4 | Subject: [PATCH] Fix the path of corosync and dlm header files check |
@@ -9,16 +9,15 @@ Fix it. | |||
9 | Upstream-Status: Inappropriate [Yocto specific] | 9 | Upstream-Status: Inappropriate [Yocto specific] |
10 | 10 | ||
11 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | 11 | Signed-off-by: Maxin B. John <maxin.john@intel.com> |
12 | |||
13 | --- | 12 | --- |
14 | Makefile | 4 ++-- | 13 | Makefile | 4 ++-- |
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | 14 | 1 file changed, 2 insertions(+), 2 deletions(-) |
16 | 15 | ||
17 | diff --git a/Makefile b/Makefile | 16 | diff --git a/Makefile b/Makefile |
18 | index 2767ac6..46bf57b 100644 | 17 | index cbdba49..7bfd336 100644 |
19 | --- a/Makefile | 18 | --- a/Makefile |
20 | +++ b/Makefile | 19 | +++ b/Makefile |
21 | @@ -91,8 +91,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots | 20 | @@ -109,8 +109,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots |
22 | SYSTEMD_DIR=/lib/systemd/system | 21 | SYSTEMD_DIR=/lib/systemd/system |
23 | LIB_DIR=/usr/libexec/mdadm | 22 | LIB_DIR=/usr/libexec/mdadm |
24 | 23 | ||
diff --git a/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch b/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch index 3f76ef54d8..a4be1aa8a1 100644 --- a/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch +++ b/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 97e776724ab9763c5bca9816370bb1635b7a8232 Mon Sep 17 00:00:00 2001 | 1 | From 0be066d57a7dd1aead5488d0a095863608f2e559 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Tue, 25 Jan 2022 16:25:01 +0800 | 3 | Date: Tue, 25 Jan 2022 16:25:01 +0800 |
4 | Subject: [PATCH] Makefile: install mdcheck | 4 | Subject: [PATCH] Makefile: install mdcheck |
@@ -14,10 +14,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
14 | 1 file changed, 1 insertion(+) | 14 | 1 file changed, 1 insertion(+) |
15 | 15 | ||
16 | diff --git a/Makefile b/Makefile | 16 | diff --git a/Makefile b/Makefile |
17 | index 2a51d813..db40c7fd 100644 | 17 | index 1141971..f4059e2 100644 |
18 | --- a/Makefile | 18 | --- a/Makefile |
19 | +++ b/Makefile | 19 | +++ b/Makefile |
20 | @@ -303,6 +303,7 @@ install-systemd: systemd/mdmon@.service | 20 | @@ -325,6 +325,7 @@ install-systemd: systemd/mdmon@.service |
21 | install-bin: mdadm mdmon | 21 | install-bin: mdadm mdmon |
22 | $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm | 22 | $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm |
23 | $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon | 23 | $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon |
@@ -25,6 +25,3 @@ index 2a51d813..db40c7fd 100644 | |||
25 | 25 | ||
26 | uninstall: | 26 | uninstall: |
27 | rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm | 27 | rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm |
28 | -- | ||
29 | 2.17.1 | ||
30 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch b/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch deleted file mode 100644 index fb4bc165fb..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 02a41c3fd560fb5250186dd6b3cff6b21daa2e2b Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
3 | Date: Mon, 15 Jul 2019 14:12:24 +0800 | ||
4 | Subject: [PATCH] Revert "tests: wait for complete rebuild in integrity checks" | ||
5 | |||
6 | This reverts commit e2a8e9dcf67a28bc722fa5ab2c49b0bc452d4d74 | ||
7 | as the logic "check state 'U*'" will make the test enters | ||
8 | infinite loop especially in qemu env, so revert it to | ||
9 | use the previous logic "check wait" which also used | ||
10 | commonly by other tests such as tests/02r5grow, tests/07revert-grow | ||
11 | and etc. | ||
12 | |||
13 | Upstream-Status: Submitted [https://marc.info/?l=linux-raid&m=156317157314030&w=2] | ||
14 | |||
15 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
16 | --- | ||
17 | tests/01r5integ | 2 +- | ||
18 | tests/01raid6integ | 4 ++-- | ||
19 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/tests/01r5integ b/tests/01r5integ | ||
22 | index 48676a2..ffb30ce 100644 | ||
23 | --- a/tests/01r5integ | ||
24 | +++ b/tests/01r5integ | ||
25 | @@ -27,7 +27,7 @@ do | ||
26 | exit 1 | ||
27 | fi | ||
28 | mdadm $md0 -a $i | ||
29 | - while ! (check state 'U*'); do check wait; sleep 0.2; done | ||
30 | + check wait | ||
31 | done | ||
32 | mdadm -S $md0 | ||
33 | done | ||
34 | diff --git a/tests/01raid6integ b/tests/01raid6integ | ||
35 | index 12f4d81..c6fcdae 100644 | ||
36 | --- a/tests/01raid6integ | ||
37 | +++ b/tests/01raid6integ | ||
38 | @@ -47,10 +47,10 @@ do | ||
39 | exit 1 | ||
40 | fi | ||
41 | mdadm $md0 -a $first | ||
42 | - while ! (check state 'U*_U*'); do check wait; sleep 0.2; done | ||
43 | + check wait | ||
44 | done | ||
45 | mdadm $md0 -a $second | ||
46 | - while ! (check state 'U*'); do check wait; sleep 0.2; done | ||
47 | + check wait | ||
48 | totest="$totest $second" | ||
49 | done | ||
50 | mdadm -S $md0 | ||
51 | -- | ||
52 | 2.7.4 | ||
53 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch index 12bf6a5920..16fdefbbd1 100644 --- a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch +++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 37c35f94d9d95dbd2b5f8a919f5478be51453590 Mon Sep 17 00:00:00 2001 | 1 | From c29d086714b49a6d76ccca83b4a6fa2f139bad6e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 13 Oct 2017 10:27:34 -0700 | 3 | Date: Fri, 13 Oct 2017 10:27:34 -0700 |
4 | Subject: [PATCH] Use CC to check for implicit-fallthrough warning support | 4 | Subject: [PATCH] Use CC to check for implicit-fallthrough warning support |
@@ -10,19 +10,35 @@ cross compile used for compiling mdadm is < version 7 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | Upstream-Status: Pending | 11 | Upstream-Status: Pending |
12 | --- | 12 | --- |
13 | Makefile | 2 +- | 13 | Makefile | 6 +++--- |
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 3 insertions(+), 3 deletions(-) |
15 | 15 | ||
16 | diff --git a/Makefile b/Makefile | 16 | diff --git a/Makefile b/Makefile |
17 | index 46bf57b..a075912 100644 | 17 | index 7bfd336..9ab6a65 100644 |
18 | --- a/Makefile | 18 | --- a/Makefile |
19 | +++ b/Makefile | 19 | +++ b/Makefile |
20 | @@ -53,7 +53,7 @@ ifdef WARN_UNUSED | 20 | @@ -56,21 +56,21 @@ CWFLAGS += -Wp -O3 |
21 | CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 | ||
22 | endif | 21 | endif |
23 | 22 | ||
24 | -FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) | 23 | ifeq ($(origin FALLTHROUGH), undefined) |
25 | +FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) | 24 | - FALLTHROUGH := $(shell gcc -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l) |
26 | ifneq "$(FALLTHROUGH)" "0" | 25 | + FALLTHROUGH := $(shell ${CC} -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l) |
27 | CWFLAGS += -Wimplicit-fallthrough=0 | 26 | ifneq "$(FALLTHROUGH)" "0" |
27 | CWFLAGS += -Wimplicit-fallthrough=0 | ||
28 | endif | ||
28 | endif | 29 | endif |
30 | |||
31 | ifeq ($(origin FORMATOVERFLOW), undefined) | ||
32 | - FORMATOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l) | ||
33 | + FORMATOVERFLOW := $(shell ${CC} -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l) | ||
34 | ifneq "$(FORMATOVERFLOW)" "0" | ||
35 | CWFLAGS += -Wformat-overflow | ||
36 | endif | ||
37 | endif | ||
38 | |||
39 | ifeq ($(origin STRINGOPOVERFLOW), undefined) | ||
40 | - STRINGOPOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l) | ||
41 | + STRINGOPOVERFLOW := $(shell ${CC} -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l) | ||
42 | ifneq "$(STRINGOPOVERFLOW)" "0" | ||
43 | CWFLAGS += -Wstringop-overflow | ||
44 | endif | ||
diff --git a/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch index fa9c8cc835..3cf295106f 100644 --- a/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch +++ b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3158d3788c2e0fb75ace2c89840bd8a977fb4cb0 Mon Sep 17 00:00:00 2001 | 1 | From 78e5bb08971a5644a56af60d51ef35e13522e811 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Fri, 14 Dec 2018 15:12:31 +0800 | 3 | Date: Fri, 14 Dec 2018 15:12:31 +0800 |
4 | Subject: [PATCH] fix gcc-8 format-truncation warning | 4 | Subject: [PATCH] fix gcc-8 format-truncation warning |
@@ -22,7 +22,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | 22 | 1 file changed, 1 insertion(+), 1 deletion(-) |
23 | 23 | ||
24 | diff --git a/super0.c b/super0.c | 24 | diff --git a/super0.c b/super0.c |
25 | index 756cab5..12c28da 100644 | 25 | index a7c5f81..a79b6bd 100644 |
26 | --- a/super0.c | 26 | --- a/super0.c |
27 | +++ b/super0.c | 27 | +++ b/super0.c |
28 | @@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost) | 28 | @@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost) |
@@ -34,6 +34,3 @@ index 756cab5..12c28da 100644 | |||
34 | int wonly, failfast; | 34 | int wonly, failfast; |
35 | if (d>=0) dp = &sb->disks[d]; | 35 | if (d>=0) dp = &sb->disks[d]; |
36 | else dp = &sb->this_disk; | 36 | else dp = &sb->this_disk; |
37 | -- | ||
38 | 2.7.4 | ||
39 | |||
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 deleted file mode 100644 index 186d1e76f2..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-mdadm-Fix-optional-write-behind-parameter.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
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/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch index e00287cab1..f224d0008d 100644 --- a/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5fdc0173cb4fcf8656f0889ad364d2549795607f Mon Sep 17 00:00:00 2001 | 1 | From c27e128fdc062ec3fcdf7b48a8c5078615c538df Mon Sep 17 00:00:00 2001 |
2 | From: Changqing Li <changqing.li@windriver.com> | 2 | From: Changqing Li <changqing.li@windriver.com> |
3 | Date: Mon, 1 Jul 2019 11:34:49 +0800 | 3 | Date: Mon, 1 Jul 2019 11:34:49 +0800 |
4 | Subject: [PATCH] mdadm: add option -y for use syslog to recive event report | 4 | Subject: [PATCH] mdadm: add option -y for use syslog to recive event report |
@@ -14,15 +14,12 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
15 | 15 | ||
16 | diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service | 16 | diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service |
17 | index 46f7b88..3fc4687 100644 | 17 | index 9c36478..d289846 100644 |
18 | --- a/systemd/mdmonitor.service | 18 | --- a/systemd/mdmonitor.service |
19 | +++ b/systemd/mdmonitor.service | 19 | +++ b/systemd/mdmonitor.service |
20 | @@ -13,4 +13,4 @@ DefaultDependencies=no | 20 | @@ -14,4 +14,4 @@ Documentation=man:mdadm(8) |
21 | Environment= MDADM_MONITOR_ARGS=--scan | 21 | Environment= MDADM_MONITOR_ARGS=--scan |
22 | EnvironmentFile=-/run/sysconfig/mdadm | 22 | EnvironmentFile=-/run/sysconfig/mdadm |
23 | ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh | 23 | ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh |
24 | -ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS | 24 | -ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS |
25 | +ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS | 25 | +ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS |
26 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch deleted file mode 100644 index 84517caade..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 1b83afa7c3121f819e72ea74883f8b6d61d6548e Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 6 Sep 2019 10:59:02 +0800 | ||
4 | Subject: [PATCH] mdadm: skip test 11spare-migration | ||
5 | |||
6 | 11spare-migration is a test series to check mdadm Monitor migrates spares | ||
7 | according to rules in /etc/mdadm.conf defined by POLICY lines. | ||
8 | |||
9 | [snip] | ||
10 | for scan in no yes; do | ||
11 | for platform in 1.2 imsm; do | ||
12 | try | ||
13 | done | ||
14 | done | ||
15 | [snip] | ||
16 | |||
17 | "try" includes near 20 sub testcase, so there are nearly 80 subcases need to run, | ||
18 | so it will take long time than ptest-runner timeout limit, skip it as workaround. | ||
19 | |||
20 | Upstream-Status: Inappropriate [oe-specific] | ||
21 | |||
22 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
23 | --- | ||
24 | test | 3 +++ | ||
25 | 1 file changed, 3 insertions(+) | ||
26 | |||
27 | diff --git a/test b/test | ||
28 | index 711a3c7..880dd1d 100755 | ||
29 | --- a/test | ||
30 | +++ b/test | ||
31 | @@ -272,6 +272,9 @@ main() { | ||
32 | else | ||
33 | for script in $testdir/$prefix $testdir/$prefix*[^~] | ||
34 | do | ||
35 | + if [ $script == "$testdir/11spare-migration" ];then | ||
36 | + continue | ||
37 | + fi | ||
38 | do_test $script | ||
39 | done | ||
40 | fi | ||
41 | -- | ||
42 | 2.7.4 | ||
43 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch index a1e7e59323..52daea2a49 100644 --- a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch +++ b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From b431cb4e1ed060122fa300dc0008f74080d38f73 Mon Sep 17 00:00:00 2001 | 1 | From 4dd5c2659722b44409cee28b4cea68cdeaa1f987 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 9 May 2016 22:03:57 +0000 | 3 | Date: Mon, 9 May 2016 22:03:57 +0000 |
4 | Subject: [PATCH] mdadm.h: Undefine dprintf before redefining | 4 | Subject: [PATCH] mdadm.h: Undefine dprintf before redefining |
@@ -20,10 +20,10 @@ Upstream-Status: Pending | |||
20 | 1 file changed, 2 insertions(+) | 20 | 1 file changed, 2 insertions(+) |
21 | 21 | ||
22 | diff --git a/mdadm.h b/mdadm.h | 22 | diff --git a/mdadm.h b/mdadm.h |
23 | index 387e681..bb943bf 100644 | 23 | index 1f28b3e..04996e2 100644 |
24 | --- a/mdadm.h | 24 | --- a/mdadm.h |
25 | +++ b/mdadm.h | 25 | +++ b/mdadm.h |
26 | @@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) | 26 | @@ -1869,11 +1869,13 @@ static inline sighandler_t signal_s(int sig, sighandler_t handler) |
27 | } | 27 | } |
28 | 28 | ||
29 | #ifdef DEBUG | 29 | #ifdef DEBUG |
diff --git a/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch b/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch index 142ed355ef..13435ee418 100644 --- a/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch +++ b/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6b861a267a6ef6f60f6cc21e4c8e6d7cdd2451dc Mon Sep 17 00:00:00 2001 | 1 | From aa86de05cd6a75222b38e0789ac96fe00f705430 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 10 Nov 2022 12:31:22 -0800 | 3 | Date: Thu, 10 Nov 2022 12:31:22 -0800 |
4 | Subject: [PATCH] restripe.c: Use _FILE_OFFSET_BITS to enable largefile support | 4 | Subject: [PATCH] restripe.c: Use _FILE_OFFSET_BITS to enable largefile support |
@@ -10,9 +10,57 @@ the width of types | |||
10 | Upstream-Status: Submitted [https://lore.kernel.org/linux-raid/20221110225546.337164-1-raj.khem@gmail.com/] | 10 | Upstream-Status: Submitted [https://lore.kernel.org/linux-raid/20221110225546.337164-1-raj.khem@gmail.com/] |
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | --- | 12 | --- |
13 | restripe.c | 13 ++++++++----- | 13 | raid6check.c | 11 +++++++---- |
14 | 1 file changed, 8 insertions(+), 5 deletions(-) | 14 | restripe.c | 13 ++++++++----- |
15 | swap_super.c | 13 +++++++------ | ||
16 | 3 files changed, 22 insertions(+), 15 deletions(-) | ||
15 | 17 | ||
18 | diff --git a/raid6check.c b/raid6check.c | ||
19 | index 9947776..8e7f142 100644 | ||
20 | --- a/raid6check.c | ||
21 | +++ b/raid6check.c | ||
22 | @@ -22,6 +22,9 @@ | ||
23 | * Based on "restripe.c" from "mdadm" codebase | ||
24 | */ | ||
25 | |||
26 | +/* Enable largefile support */ | ||
27 | +#define _FILE_OFFSET_BITS 64 | ||
28 | + | ||
29 | #include "mdadm.h" | ||
30 | #include <stdint.h> | ||
31 | #include <sys/mman.h> | ||
32 | @@ -284,9 +287,9 @@ int manual_repair(int chunk_size, int syndrome_disks, | ||
33 | } | ||
34 | |||
35 | int write_res1, write_res2; | ||
36 | - off64_t seek_res; | ||
37 | + off_t seek_res; | ||
38 | |||
39 | - seek_res = lseek64(source[fd1], | ||
40 | + seek_res = lseek(source[fd1], | ||
41 | offsets[fd1] + start * chunk_size, SEEK_SET); | ||
42 | if (seek_res < 0) { | ||
43 | fprintf(stderr, "lseek failed for failed_disk1\n"); | ||
44 | @@ -294,7 +297,7 @@ int manual_repair(int chunk_size, int syndrome_disks, | ||
45 | } | ||
46 | write_res1 = write(source[fd1], blocks[failed_slot1], chunk_size); | ||
47 | |||
48 | - seek_res = lseek64(source[fd2], | ||
49 | + seek_res = lseek(source[fd2], | ||
50 | offsets[fd2] + start * chunk_size, SEEK_SET); | ||
51 | if (seek_res < 0) { | ||
52 | fprintf(stderr, "lseek failed for failed_disk2\n"); | ||
53 | @@ -379,7 +382,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets, | ||
54 | goto exitCheck; | ||
55 | } | ||
56 | for (i = 0 ; i < raid_disks ; i++) { | ||
57 | - off64_t seek_res = lseek64(source[i], offsets[i] + start * chunk_size, | ||
58 | + off_t seek_res = lseek(source[i], offsets[i] + start * chunk_size, | ||
59 | SEEK_SET); | ||
60 | if (seek_res < 0) { | ||
61 | fprintf(stderr, "lseek to source %d failed\n", i); | ||
62 | diff --git a/restripe.c b/restripe.c | ||
63 | index a7a7229..1c03577 100644 | ||
16 | --- a/restripe.c | 64 | --- a/restripe.c |
17 | +++ b/restripe.c | 65 | +++ b/restripe.c |
18 | @@ -22,6 +22,9 @@ | 66 | @@ -22,6 +22,9 @@ |
@@ -25,7 +73,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
25 | #include "mdadm.h" | 73 | #include "mdadm.h" |
26 | #include <stdint.h> | 74 | #include <stdint.h> |
27 | 75 | ||
28 | @@ -581,7 +584,7 @@ int save_stripes(int *source, unsigned l | 76 | @@ -581,7 +584,7 @@ int save_stripes(int *source, unsigned long long *offsets, |
29 | raid_disks, level, layout); | 77 | raid_disks, level, layout); |
30 | if (dnum < 0) abort(); | 78 | if (dnum < 0) abort(); |
31 | if (source[dnum] < 0 || | 79 | if (source[dnum] < 0 || |
@@ -34,7 +82,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
34 | offsets[dnum] + offset, 0) < 0 || | 82 | offsets[dnum] + offset, 0) < 0 || |
35 | read(source[dnum], buf+disk * chunk_size, | 83 | read(source[dnum], buf+disk * chunk_size, |
36 | chunk_size) != chunk_size) { | 84 | chunk_size) != chunk_size) { |
37 | @@ -754,8 +757,8 @@ int restore_stripes(int *dest, unsigned | 85 | @@ -754,8 +757,8 @@ int restore_stripes(int *dest, unsigned long long *offsets, |
38 | raid_disks, level, layout); | 86 | raid_disks, level, layout); |
39 | if (src_buf == NULL) { | 87 | if (src_buf == NULL) { |
40 | /* read from file */ | 88 | /* read from file */ |
@@ -45,7 +93,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
45 | rv = -1; | 93 | rv = -1; |
46 | goto abort; | 94 | goto abort; |
47 | } | 95 | } |
48 | @@ -816,7 +819,7 @@ int restore_stripes(int *dest, unsigned | 96 | @@ -816,7 +819,7 @@ int restore_stripes(int *dest, unsigned long long *offsets, |
49 | } | 97 | } |
50 | for (i=0; i < raid_disks ; i++) | 98 | for (i=0; i < raid_disks ; i++) |
51 | if (dest[i] >= 0) { | 99 | if (dest[i] >= 0) { |
@@ -54,7 +102,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
54 | offsets[i]+offset, 0) < 0) { | 102 | offsets[i]+offset, 0) < 0) { |
55 | rv = -1; | 103 | rv = -1; |
56 | goto abort; | 104 | goto abort; |
57 | @@ -866,7 +869,7 @@ int test_stripes(int *source, unsigned l | 105 | @@ -866,7 +869,7 @@ int test_stripes(int *source, unsigned long long *offsets, |
58 | int disk; | 106 | int disk; |
59 | 107 | ||
60 | for (i = 0 ; i < raid_disks ; i++) { | 108 | for (i = 0 ; i < raid_disks ; i++) { |
@@ -63,48 +111,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
63 | (read(source[i], stripes[i], chunk_size) != | 111 | (read(source[i], stripes[i], chunk_size) != |
64 | chunk_size)) { | 112 | chunk_size)) { |
65 | free(q); | 113 | free(q); |
66 | --- a/raid6check.c | 114 | diff --git a/swap_super.c b/swap_super.c |
67 | +++ b/raid6check.c | 115 | index b6db574..18c89e2 100644 |
68 | @@ -22,6 +22,9 @@ | ||
69 | * Based on "restripe.c" from "mdadm" codebase | ||
70 | */ | ||
71 | |||
72 | +/* Enable largefile support */ | ||
73 | +#define _FILE_OFFSET_BITS 64 | ||
74 | + | ||
75 | #include "mdadm.h" | ||
76 | #include <stdint.h> | ||
77 | #include <signal.h> | ||
78 | @@ -279,9 +282,9 @@ int manual_repair(int chunk_size, int sy | ||
79 | } | ||
80 | |||
81 | int write_res1, write_res2; | ||
82 | - off64_t seek_res; | ||
83 | + off_t seek_res; | ||
84 | |||
85 | - seek_res = lseek64(source[fd1], | ||
86 | + seek_res = lseek(source[fd1], | ||
87 | offsets[fd1] + start * chunk_size, SEEK_SET); | ||
88 | if (seek_res < 0) { | ||
89 | fprintf(stderr, "lseek failed for failed_disk1\n"); | ||
90 | @@ -289,7 +292,7 @@ int manual_repair(int chunk_size, int sy | ||
91 | } | ||
92 | write_res1 = write(source[fd1], blocks[failed_slot1], chunk_size); | ||
93 | |||
94 | - seek_res = lseek64(source[fd2], | ||
95 | + seek_res = lseek(source[fd2], | ||
96 | offsets[fd2] + start * chunk_size, SEEK_SET); | ||
97 | if (seek_res < 0) { | ||
98 | fprintf(stderr, "lseek failed for failed_disk2\n"); | ||
99 | @@ -374,7 +377,7 @@ int check_stripes(struct mdinfo *info, i | ||
100 | goto exitCheck; | ||
101 | } | ||
102 | for (i = 0 ; i < raid_disks ; i++) { | ||
103 | - off64_t seek_res = lseek64(source[i], offsets[i] + start * chunk_size, | ||
104 | + off_t seek_res = lseek(source[i], offsets[i] + start * chunk_size, | ||
105 | SEEK_SET); | ||
106 | if (seek_res < 0) { | ||
107 | fprintf(stderr, "lseek to source %d failed\n", i); | ||
108 | --- a/swap_super.c | 116 | --- a/swap_super.c |
109 | +++ b/swap_super.c | 117 | +++ b/swap_super.c |
110 | @@ -1,3 +1,6 @@ | 118 | @@ -1,3 +1,6 @@ |
diff --git a/meta/recipes-extended/mdadm/files/0001-tests-00raid0-add-a-test-that-validates-raid0-with-l.patch b/meta/recipes-extended/mdadm/files/0001-tests-00raid0-add-a-test-that-validates-raid0-with-l.patch deleted file mode 100644 index 1c95834a7e..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-tests-00raid0-add-a-test-that-validates-raid0-with-l.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 7539254342bc591717b0051734cc6c09c1b88640 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:13 -0600 | ||
4 | Subject: [PATCH] tests/00raid0: add a test that validates raid0 with layout | ||
5 | fails for 0.9 | ||
6 | |||
7 | 329dfc28debb disallows the creation of raid0 with layouts for 0.9 | ||
8 | metadata. This test confirms the new behavior. | ||
9 | |||
10 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=7539254342bc591717b0051734cc6c09c1b88640] | ||
11 | |||
12 | Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
13 | Signed-off-by: Himanshu Madhani <himanshu.madhani@oracle.com> | ||
14 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
15 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
16 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
17 | --- | ||
18 | tests/00raid0 | 6 ++---- | ||
19 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
20 | |||
21 | diff --git a/tests/00raid0 b/tests/00raid0 | ||
22 | index 8bc18985..e6b21cc4 100644 | ||
23 | --- a/tests/00raid0 | ||
24 | +++ b/tests/00raid0 | ||
25 | @@ -6,11 +6,9 @@ check raid0 | ||
26 | testdev $md0 3 $mdsize2_l 512 | ||
27 | mdadm -S $md0 | ||
28 | |||
29 | -# now with version-0.90 superblock | ||
30 | +# verify raid0 with layouts fail for 0.90 | ||
31 | mdadm -CR $md0 -e0.90 -l0 -n4 $dev0 $dev1 $dev2 $dev3 | ||
32 | -check raid0 | ||
33 | -testdev $md0 4 $mdsize0 512 | ||
34 | -mdadm -S $md0 | ||
35 | +check opposite_result | ||
36 | |||
37 | # now with no superblock | ||
38 | mdadm -B $md0 -l0 -n5 $dev0 $dev1 $dev2 $dev3 $dev4 | ||
39 | -- | ||
40 | 2.25.1 | ||
41 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-tests-00readonly-Run-udevadm-settle-before-setting-r.patch b/meta/recipes-extended/mdadm/files/0001-tests-00readonly-Run-udevadm-settle-before-setting-r.patch deleted file mode 100644 index c621c082e8..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-tests-00readonly-Run-udevadm-settle-before-setting-r.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 39b381252c32275079344d30de18b76fda4bba26 Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 27 Jul 2022 15:52:45 -0600 | ||
4 | Subject: [PATCH] tests/00readonly: Run udevadm settle before setting ro | ||
5 | |||
6 | In some recent kernel versions, 00readonly fails with: | ||
7 | |||
8 | mdadm: failed to set readonly for /dev/md0: Device or resource busy | ||
9 | ERROR: array is not read-only! | ||
10 | |||
11 | This was traced down to a race condition with udev holding a reference | ||
12 | to the block device at the same time as trying to set it read only. | ||
13 | |||
14 | To fix this, call udevadm settle before setting the array read only. | ||
15 | |||
16 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=39b381252c32275079344d30de18b76fda4bba26] | ||
17 | |||
18 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
19 | Signed-off-by: Jes Sorensen <jsorensen@fb.com> | ||
20 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
21 | --- | ||
22 | tests/00readonly | 1 + | ||
23 | 1 file changed, 1 insertion(+) | ||
24 | |||
25 | diff --git a/tests/00readonly b/tests/00readonly | ||
26 | index 39202487..afe243b3 100644 | ||
27 | --- a/tests/00readonly | ||
28 | +++ b/tests/00readonly | ||
29 | @@ -12,6 +12,7 @@ do | ||
30 | $dev1 $dev2 $dev3 $dev4 --assume-clean | ||
31 | check nosync | ||
32 | check $level | ||
33 | + udevadm settle | ||
34 | mdadm -ro $md0 | ||
35 | check readonly | ||
36 | state=$(cat /sys/block/md0/md/array_state) | ||
37 | -- | ||
38 | 2.25.1 | ||
39 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-tests-02lineargrow-clear-the-superblock-at-every-ite.patch b/meta/recipes-extended/mdadm/files/0001-tests-02lineargrow-clear-the-superblock-at-every-ite.patch deleted file mode 100644 index 1a7104b76d..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-tests-02lineargrow-clear-the-superblock-at-every-ite.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From a2c832465fc75202e244327b2081231dfa974617 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:16 -0600 | ||
4 | Subject: [PATCH] tests/02lineargrow: clear the superblock at every iteration | ||
5 | |||
6 | This fixes 02lineargrow test as prior metadata causes --add operation | ||
7 | to misbehave. | ||
8 | |||
9 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=a2c832465fc75202e244327b2081231dfa974617] | ||
10 | |||
11 | Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
12 | Signed-off-by: Himanshu Madhani <himanshu.madhani@oracle.com> | ||
13 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
14 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
15 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
16 | --- | ||
17 | tests/02lineargrow | 2 ++ | ||
18 | 1 file changed, 2 insertions(+) | ||
19 | |||
20 | diff --git a/tests/02lineargrow b/tests/02lineargrow | ||
21 | index e05c219d..595bf9f2 100644 | ||
22 | --- a/tests/02lineargrow | ||
23 | +++ b/tests/02lineargrow | ||
24 | @@ -20,4 +20,6 @@ do | ||
25 | testdev $md0 3 $sz 1 | ||
26 | |||
27 | mdadm -S $md0 | ||
28 | + mdadm --zero /dev/loop2 | ||
29 | + mdadm --zero /dev/loop3 | ||
30 | done | ||
31 | -- | ||
32 | 2.25.1 | ||
33 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-tests-04update-metadata-avoid-passing-chunk-size-to.patch b/meta/recipes-extended/mdadm/files/0001-tests-04update-metadata-avoid-passing-chunk-size-to.patch deleted file mode 100644 index 9098fb2540..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-tests-04update-metadata-avoid-passing-chunk-size-to.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From de045db607b1ac4b70fc2a8878463e029c2ab1dc Mon Sep 17 00:00:00 2001 | ||
2 | From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:15 -0600 | ||
4 | Subject: [PATCH] tests/04update-metadata: avoid passing chunk size to raid1 | ||
5 | |||
6 | '04update-metadata' test fails with error, "specifying chunk size is | ||
7 | forbidden for this level" added by commit, 5b30a34aa4b5e. Hence, | ||
8 | correcting the test to ignore passing chunk size to raid1. | ||
9 | |||
10 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=de045db607b1ac4b70fc2a8878463e029c2ab1dc] | ||
11 | |||
12 | Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
13 | Signed-off-by: Himanshu Madhani <himanshu.madhani@oracle.com> | ||
14 | [logang@deltatee.com: fix if/then style and dropped unrelated hunk] | ||
15 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
16 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
17 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
18 | --- | ||
19 | tests/04update-metadata | 6 +++++- | ||
20 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/tests/04update-metadata b/tests/04update-metadata | ||
23 | index 08c14af7..2b72a303 100644 | ||
24 | --- a/tests/04update-metadata | ||
25 | +++ b/tests/04update-metadata | ||
26 | @@ -11,7 +11,11 @@ dlist="$dev0 $dev1 $dev2 $dev3" | ||
27 | for ls in linear/4 raid1/1 raid5/3 raid6/2 | ||
28 | do | ||
29 | s=${ls#*/} l=${ls%/*} | ||
30 | - mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist | ||
31 | + if [[ $l == 'raid1' ]]; then | ||
32 | + mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 $dlist | ||
33 | + else | ||
34 | + mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist | ||
35 | + fi | ||
36 | testdev $md0 $s 19904 64 | ||
37 | mdadm -S $md0 | ||
38 | mdadm -A $md0 --update=metadata $dlist | ||
39 | -- | ||
40 | 2.25.1 | ||
41 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-tests-add-.broken-files-for-04update-uuid-and-07reve.patch b/meta/recipes-extended/mdadm/files/0001-tests-add-.broken-files-for-04update-uuid-and-07reve.patch deleted file mode 100644 index 5a6bf9e4bd..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-tests-add-.broken-files-for-04update-uuid-and-07reve.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From ee594b1a12833c06102de888248a361bc49cea09 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
3 | Date: Fri, 18 Aug 2023 12:20:40 +0300 | ||
4 | Subject: [PATCH] tests: add .broken files for 04update-uuid and | ||
5 | 07revert-inplace | ||
6 | |||
7 | 04update-uuid and 07revert-inplace tests are unreliable and fail intermittently | ||
8 | on the autobuilder. Unfortunately, the failures cannot be reproduced locally | ||
9 | and the logs cannot be retrieved from the AB. | ||
10 | |||
11 | Mark the testcases as BROKEN to skip them when running ptest. | ||
12 | |||
13 | Upstream-Status: Inappropriate | ||
14 | |||
15 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
16 | --- | ||
17 | tests/04update-uuid.broken | 1 + | ||
18 | tests/07revert-inplace.broken | 1 + | ||
19 | 2 files changed, 2 insertions(+) | ||
20 | create mode 100644 tests/04update-uuid.broken | ||
21 | create mode 100644 tests/07revert-inplace.broken | ||
22 | |||
23 | diff --git a/tests/04update-uuid.broken b/tests/04update-uuid.broken | ||
24 | new file mode 100644 | ||
25 | index 0000000..197b35b | ||
26 | --- /dev/null | ||
27 | +++ b/tests/04update-uuid.broken | ||
28 | @@ -0,0 +1 @@ | ||
29 | +fails infrequently | ||
30 | diff --git a/tests/07revert-inplace.broken b/tests/07revert-inplace.broken | ||
31 | new file mode 100644 | ||
32 | index 0000000..197b35b | ||
33 | --- /dev/null | ||
34 | +++ b/tests/07revert-inplace.broken | ||
35 | @@ -0,0 +1 @@ | ||
36 | +fails infrequently | ||
37 | -- | ||
38 | 2.39.1 | ||
39 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-tests-fix-raid0-tests-for-0.90-metadata.patch b/meta/recipes-extended/mdadm/files/0001-tests-fix-raid0-tests-for-0.90-metadata.patch deleted file mode 100644 index d2e7d8ee50..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-tests-fix-raid0-tests-for-0.90-metadata.patch +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | From 14c2161edb77d7294199e8aa7daa9f9d1d0ad5d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:14 -0600 | ||
4 | Subject: [PATCH] tests: fix raid0 tests for 0.90 metadata | ||
5 | |||
6 | Some of the test cases fail because raid0 creation fails with the error, | ||
7 | "0.90 metadata does not support layouts for RAID0" added by commit, | ||
8 | 329dfc28debb. Fix some of the test cases by switching from raid0 to | ||
9 | linear level for 0.9 metadata where possible. | ||
10 | |||
11 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=14c2161edb77d7294199e8aa7daa9f9d1d0ad5d7] | ||
12 | |||
13 | Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> | ||
14 | Signed-off-by: Himanshu Madhani <himanshu.madhani@oracle.com> | ||
15 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
16 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
17 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
18 | --- | ||
19 | tests/00raid0 | 4 ++-- | ||
20 | tests/00readonly | 4 ++++ | ||
21 | tests/03r0assem | 6 +++--- | ||
22 | tests/04r0update | 4 ++-- | ||
23 | tests/04update-metadata | 2 +- | ||
24 | 5 files changed, 12 insertions(+), 8 deletions(-) | ||
25 | |||
26 | diff --git a/tests/00raid0 b/tests/00raid0 | ||
27 | index e6b21cc4..9b8896cb 100644 | ||
28 | --- a/tests/00raid0 | ||
29 | +++ b/tests/00raid0 | ||
30 | @@ -20,8 +20,8 @@ mdadm -S $md0 | ||
31 | # now same again with different chunk size | ||
32 | for chunk in 4 32 256 | ||
33 | do | ||
34 | - mdadm -CR $md0 -e0.90 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2 | ||
35 | - check raid0 | ||
36 | + mdadm -CR $md0 -e0.90 -l linear --chunk $chunk -n3 $dev0 $dev1 $dev2 | ||
37 | + check linear | ||
38 | testdev $md0 3 $mdsize0 $chunk | ||
39 | mdadm -S $md0 | ||
40 | |||
41 | diff --git a/tests/00readonly b/tests/00readonly | ||
42 | index 28b0fa13..39202487 100644 | ||
43 | --- a/tests/00readonly | ||
44 | +++ b/tests/00readonly | ||
45 | @@ -4,6 +4,10 @@ for metadata in 0.9 1.0 1.1 1.2 | ||
46 | do | ||
47 | for level in linear raid0 raid1 raid4 raid5 raid6 raid10 | ||
48 | do | ||
49 | + if [[ $metadata == "0.9" && $level == "raid0" ]]; | ||
50 | + then | ||
51 | + continue | ||
52 | + fi | ||
53 | mdadm -CR $md0 -l $level -n 4 --metadata=$metadata \ | ||
54 | $dev1 $dev2 $dev3 $dev4 --assume-clean | ||
55 | check nosync | ||
56 | diff --git a/tests/03r0assem b/tests/03r0assem | ||
57 | index 6744e322..44df0645 100644 | ||
58 | --- a/tests/03r0assem | ||
59 | +++ b/tests/03r0assem | ||
60 | @@ -68,9 +68,9 @@ mdadm -S $md2 | ||
61 | ### Now for version 0... | ||
62 | |||
63 | mdadm --zero-superblock $dev0 $dev1 $dev2 | ||
64 | -mdadm -CR $md2 -l0 --metadata=0.90 -n3 $dev0 $dev1 $dev2 | ||
65 | -check raid0 | ||
66 | -tst="testdev $md2 3 $mdsize0 512" | ||
67 | +mdadm -CR $md2 -llinear --metadata=0.90 -n3 $dev0 $dev1 $dev2 | ||
68 | +check linear | ||
69 | +tst="testdev $md2 3 $mdsize0 1" | ||
70 | $tst | ||
71 | |||
72 | uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'` | ||
73 | diff --git a/tests/04r0update b/tests/04r0update | ||
74 | index 73ee3b9f..b95efb06 100644 | ||
75 | --- a/tests/04r0update | ||
76 | +++ b/tests/04r0update | ||
77 | @@ -1,7 +1,7 @@ | ||
78 | |||
79 | # create a raid0, re-assemble with a different super-minor | ||
80 | -mdadm -CR -e 0.90 $md0 -l0 -n3 $dev0 $dev1 $dev2 | ||
81 | -testdev $md0 3 $mdsize0 512 | ||
82 | +mdadm -CR -e 0.90 $md0 -llinear -n3 $dev0 $dev1 $dev2 | ||
83 | +testdev $md0 3 $mdsize0 1 | ||
84 | minor1=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'` | ||
85 | mdadm -S /dev/md0 | ||
86 | |||
87 | diff --git a/tests/04update-metadata b/tests/04update-metadata | ||
88 | index 232fc1ff..08c14af7 100644 | ||
89 | --- a/tests/04update-metadata | ||
90 | +++ b/tests/04update-metadata | ||
91 | @@ -8,7 +8,7 @@ set -xe | ||
92 | |||
93 | dlist="$dev0 $dev1 $dev2 $dev3" | ||
94 | |||
95 | -for ls in raid0/4 linear/4 raid1/1 raid5/3 raid6/2 | ||
96 | +for ls in linear/4 raid1/1 raid5/3 raid6/2 | ||
97 | do | ||
98 | s=${ls#*/} l=${ls%/*} | ||
99 | mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist | ||
100 | -- | ||
101 | 2.25.1 | ||
102 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch b/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch new file mode 100644 index 0000000000..0916efafdf --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From 8fa7d3cb96e8833743b635fb198675ad6c020b6e Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Tue, 12 Mar 2024 10:51:51 +0100 | ||
4 | Subject: [PATCH] util.c: add limits.h include for NAME_MAX definition | ||
5 | |||
6 | Upstream-Status: Submitted [mariusz.tkaczyk@linux.intel.com,linux-raid@vger.kernel.org] | ||
7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
8 | --- | ||
9 | util.c | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/util.c b/util.c | ||
13 | index b145447..a9cb6c4 100644 | ||
14 | --- a/util.c | ||
15 | +++ b/util.c | ||
16 | @@ -36,7 +36,7 @@ | ||
17 | #include <ctype.h> | ||
18 | #include <dirent.h> | ||
19 | #include <dlfcn.h> | ||
20 | - | ||
21 | +#include <limits.h> | ||
22 | |||
23 | /* | ||
24 | * following taken from linux/blkpg.h because they aren't | ||
diff --git a/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch b/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch new file mode 100644 index 0000000000..145c65477a --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From a22b2345b9773d362acd85dd4c4a6a3cda9100d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Tue, 12 Mar 2024 10:54:08 +0100 | ||
4 | Subject: [PATCH] Create.c: include linux/falloc.h for FALLOC_FL_ZERO_RANGE | ||
5 | definition | ||
6 | |||
7 | glibc provides this through fcntl.h but musl does not - should | ||
8 | be reported and fixed there. | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl-specific issue] | ||
11 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
12 | --- | ||
13 | Create.c | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/Create.c b/Create.c | ||
17 | index 8082f54..7071f0a 100644 | ||
18 | --- a/Create.c | ||
19 | +++ b/Create.c | ||
20 | @@ -31,6 +31,7 @@ | ||
21 | #include <signal.h> | ||
22 | #include <sys/signalfd.h> | ||
23 | #include <sys/wait.h> | ||
24 | +#include <linux/falloc.h> | ||
25 | |||
26 | static int round_size_and_verify(unsigned long long *size, int chunk) | ||
27 | { | ||
diff --git a/meta/recipes-extended/mdadm/files/0002-DDF-Fix-NULL-pointer-dereference-in-validate_geometr.patch b/meta/recipes-extended/mdadm/files/0002-DDF-Fix-NULL-pointer-dereference-in-validate_geometr.patch deleted file mode 100644 index fafe88b49c..0000000000 --- a/meta/recipes-extended/mdadm/files/0002-DDF-Fix-NULL-pointer-dereference-in-validate_geometr.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 14f110f0286d38e29ef5e51d7f72e049c2f18323 Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:08 -0600 | ||
4 | Subject: [PATCH 2/4] DDF: Fix NULL pointer dereference in | ||
5 | validate_geometry_ddf() | ||
6 | |||
7 | A relatively recent patch added a call to validate_geometry() in | ||
8 | Manage_add() that has level=LEVEL_CONTAINER and chunk=NULL. | ||
9 | |||
10 | This causes some ddf tests to segfault which aborts the test suite. | ||
11 | |||
12 | To fix this, avoid dereferencing chunk when the level is | ||
13 | LEVEL_CONTAINER or LEVEL_NONE. | ||
14 | |||
15 | Fixes: 1f5d54a06df0 ("Manage: Call validate_geometry when adding drive to external container") | ||
16 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
17 | Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | ||
18 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
19 | |||
20 | Upstream-Status: Backport | ||
21 | |||
22 | Reference to upstream patch: | ||
23 | https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=2b93288a5650 | ||
24 | |||
25 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
26 | --- | ||
27 | super-ddf.c | 6 +++--- | ||
28 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
29 | |||
30 | diff --git a/super-ddf.c b/super-ddf.c | ||
31 | index 65cf727..3ef1293 100644 | ||
32 | --- a/super-ddf.c | ||
33 | +++ b/super-ddf.c | ||
34 | @@ -3369,9 +3369,6 @@ static int validate_geometry_ddf(struct supertype *st, | ||
35 | * If given BVDs, we make an SVD, changing all the GUIDs in the process. | ||
36 | */ | ||
37 | |||
38 | - if (*chunk == UnSet) | ||
39 | - *chunk = DEFAULT_CHUNK; | ||
40 | - | ||
41 | if (level == LEVEL_NONE) | ||
42 | level = LEVEL_CONTAINER; | ||
43 | if (level == LEVEL_CONTAINER) { | ||
44 | @@ -3381,6 +3378,9 @@ static int validate_geometry_ddf(struct supertype *st, | ||
45 | freesize, verbose); | ||
46 | } | ||
47 | |||
48 | + if (*chunk == UnSet) | ||
49 | + *chunk = DEFAULT_CHUNK; | ||
50 | + | ||
51 | if (!dev) { | ||
52 | mdu_array_info_t array = { | ||
53 | .level = level, | ||
54 | -- | ||
55 | 2.39.1 | ||
56 | |||
diff --git a/meta/recipes-extended/mdadm/files/0003-mdadm-Grow-Fix-use-after-close-bug-by-closing-after-.patch b/meta/recipes-extended/mdadm/files/0003-mdadm-Grow-Fix-use-after-close-bug-by-closing-after-.patch deleted file mode 100644 index a954ab027a..0000000000 --- a/meta/recipes-extended/mdadm/files/0003-mdadm-Grow-Fix-use-after-close-bug-by-closing-after-.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | From bd064da1469a6a07331b076a0294a8c6c3c38526 Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:09 -0600 | ||
4 | Subject: [PATCH 3/4] mdadm/Grow: Fix use after close bug by closing after fork | ||
5 | |||
6 | The test 07reshape-grow fails most of the time. But it succeeds around | ||
7 | 1 in 5 times. When it does succeed, it causes the tests to die because | ||
8 | mdadm has segfaulted. | ||
9 | |||
10 | The segfault was caused by mdadm attempting to repoen a file | ||
11 | descriptor that was already closed. The backtrace of the segfault | ||
12 | was: | ||
13 | |||
14 | #0 __strncmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:101 | ||
15 | #1 0x000056146e31d44b in devnm2devid (devnm=0x0) at util.c:956 | ||
16 | #2 0x000056146e31dab4 in open_dev_flags (devnm=0x0, flags=0) | ||
17 | at util.c:1072 | ||
18 | #3 0x000056146e31db22 in open_dev (devnm=0x0) at util.c:1079 | ||
19 | #4 0x000056146e3202e8 in reopen_mddev (mdfd=4) at util.c:2244 | ||
20 | #5 0x000056146e329f36 in start_array (mdfd=4, | ||
21 | mddev=0x7ffc55342450 "/dev/md0", content=0x7ffc55342860, | ||
22 | st=0x56146fc78660, ident=0x7ffc55342f70, best=0x56146fc6f5d0, | ||
23 | bestcnt=10, chosen_drive=0, devices=0x56146fc706b0, okcnt=5, | ||
24 | sparecnt=0, rebuilding_cnt=0, journalcnt=0, c=0x7ffc55342e90, | ||
25 | clean=1, avail=0x56146fc78720 "\001\001\001\001\001", | ||
26 | start_partial_ok=0, err_ok=0, was_forced=0) | ||
27 | at Assemble.c:1206 | ||
28 | #6 0x000056146e32c36e in Assemble (st=0x56146fc78660, | ||
29 | mddev=0x7ffc55342450 "/dev/md0", ident=0x7ffc55342f70, | ||
30 | devlist=0x56146fc6e2d0, c=0x7ffc55342e90) | ||
31 | at Assemble.c:1914 | ||
32 | #7 0x000056146e312ac9 in main (argc=11, argv=0x7ffc55343238) | ||
33 | at mdadm.c:1510 | ||
34 | |||
35 | The file descriptor was closed early in Grow_continue(). The noted commit | ||
36 | moved the close() call to close the fd above the fork which caused the | ||
37 | parent process to return with a closed fd. | ||
38 | |||
39 | This meant reshape_array() and Grow_continue() would return in the parent | ||
40 | with the fd forked. The fd would eventually be passed to reopen_mddev() | ||
41 | which returned an unhandled NULL from fd2devnm() which would then be | ||
42 | dereferenced in devnm2devid. | ||
43 | |||
44 | Fix this by moving the close() call below the fork. This appears to | ||
45 | fix the 07revert-grow test. While we're at it, switch to using | ||
46 | close_fd() to invalidate the file descriptor. | ||
47 | |||
48 | Fixes: 77b72fa82813 ("mdadm/Grow: prevent md's fd from being occupied during delayed time") | ||
49 | Cc: Alex Wu <alexwu@synology.com> | ||
50 | Cc: BingJing Chang <bingjingc@synology.com> | ||
51 | Cc: Danny Shih <dannyshih@synology.com> | ||
52 | Cc: ChangSyun Peng <allenpeng@synology.com> | ||
53 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
54 | Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | ||
55 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
56 | |||
57 | Upstream-Status: Backport | ||
58 | |||
59 | Reference to upstream patch: | ||
60 | https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=548e9b916f86 | ||
61 | |||
62 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
63 | --- | ||
64 | Grow.c | 4 +++- | ||
65 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
66 | |||
67 | diff --git a/Grow.c b/Grow.c | ||
68 | index 9c6fc95..a8e4e83 100644 | ||
69 | --- a/Grow.c | ||
70 | +++ b/Grow.c | ||
71 | @@ -3501,7 +3501,6 @@ started: | ||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | - close(fd); | ||
76 | /* Now we just need to kick off the reshape and watch, while | ||
77 | * handling backups of the data... | ||
78 | * This is all done by a forked background process. | ||
79 | @@ -3522,6 +3521,9 @@ started: | ||
80 | break; | ||
81 | } | ||
82 | |||
83 | + /* Close unused file descriptor in the forked process */ | ||
84 | + close_fd(&fd); | ||
85 | + | ||
86 | /* If another array on the same devices is busy, the | ||
87 | * reshape will wait for them. This would mean that | ||
88 | * the first section that we suspend will stay suspended | ||
89 | -- | ||
90 | 2.39.1 | ||
91 | |||
diff --git a/meta/recipes-extended/mdadm/files/0004-monitor-Avoid-segfault-when-calling-NULL-get_bad_blo.patch b/meta/recipes-extended/mdadm/files/0004-monitor-Avoid-segfault-when-calling-NULL-get_bad_blo.patch deleted file mode 100644 index 72cb40f782..0000000000 --- a/meta/recipes-extended/mdadm/files/0004-monitor-Avoid-segfault-when-calling-NULL-get_bad_blo.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 2296a4a441b4b8546e2eb32403930f1bb8f3ee4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:10 -0600 | ||
4 | Subject: [PATCH 4/4] monitor: Avoid segfault when calling NULL get_bad_blocks | ||
5 | |||
6 | Not all struct superswitch implement a get_bad_blocks() function, | ||
7 | yet mdmon seems to call it without checking for NULL and thus | ||
8 | occasionally segfaults in the test 10ddf-geometry. | ||
9 | |||
10 | Fix this by checking for NULL before calling it. | ||
11 | |||
12 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
13 | Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | ||
14 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | |||
18 | Reference to upstream patch: | ||
19 | https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=9ae62977b51d | ||
20 | |||
21 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
22 | --- | ||
23 | monitor.c | 3 +++ | ||
24 | 1 file changed, 3 insertions(+) | ||
25 | |||
26 | diff --git a/monitor.c b/monitor.c | ||
27 | index afc3e50..8e43c0d 100644 | ||
28 | --- a/monitor.c | ||
29 | +++ b/monitor.c | ||
30 | @@ -312,6 +312,9 @@ static int check_for_cleared_bb(struct active_array *a, struct mdinfo *mdi) | ||
31 | struct md_bb *bb; | ||
32 | int i; | ||
33 | |||
34 | + if (!ss->get_bad_blocks) | ||
35 | + return -1; | ||
36 | + | ||
37 | /* | ||
38 | * Get a list of bad blocks for an array, then read list of | ||
39 | * acknowledged bad blocks from kernel and compare it against metadata | ||
40 | -- | ||
41 | 2.39.1 | ||
42 | |||
diff --git a/meta/recipes-extended/mdadm/files/0005-mdadm-test-Mark-and-ignore-broken-test-failures.patch b/meta/recipes-extended/mdadm/files/0005-mdadm-test-Mark-and-ignore-broken-test-failures.patch deleted file mode 100644 index c55bfb125b..0000000000 --- a/meta/recipes-extended/mdadm/files/0005-mdadm-test-Mark-and-ignore-broken-test-failures.patch +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | From feab1f72fcf032a4d21d0a69eb61b23a5ddb3352 Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:18 -0600 | ||
4 | Subject: [PATCH 5/6] mdadm/test: Mark and ignore broken test failures | ||
5 | |||
6 | Add functionality to continue if a test marked as broken fails. | ||
7 | |||
8 | To mark a test as broken, a file with the same name but with the suffix | ||
9 | '.broken' should exist. The first line in the file will be printed with | ||
10 | a KNOWN BROKEN message; the rest of the file can describe the how the | ||
11 | test is broken. | ||
12 | |||
13 | Also adds --skip-broken and --skip-always-broken to skip all the tests | ||
14 | that have a .broken file or to skip all tests whose .broken file's first | ||
15 | line contains the keyword always. | ||
16 | |||
17 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
18 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
19 | |||
20 | Upstream-Status: Backport | ||
21 | |||
22 | Reference to upstream patch: | ||
23 | https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=28520bf114b3 | ||
24 | |||
25 | [OP: adjusted context for mdadm-4.2] | ||
26 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
27 | --- | ||
28 | test | 37 +++++++++++++++++++++++++++++++++++-- | ||
29 | 1 file changed, 35 insertions(+), 2 deletions(-) | ||
30 | |||
31 | diff --git a/test b/test | ||
32 | index 8f189d9..ee8fba1 100755 | ||
33 | --- a/test | ||
34 | +++ b/test | ||
35 | @@ -10,6 +10,8 @@ devlist= | ||
36 | |||
37 | savelogs=0 | ||
38 | exitonerror=1 | ||
39 | +ctrl_c_error=0 | ||
40 | +skipbroken=0 | ||
41 | prefix='[0-9][0-9]' | ||
42 | |||
43 | # use loop devices by default if doesn't specify --dev | ||
44 | @@ -35,6 +37,7 @@ die() { | ||
45 | |||
46 | ctrl_c() { | ||
47 | exitonerror=1 | ||
48 | + ctrl_c_error=1 | ||
49 | } | ||
50 | |||
51 | # mdadm always adds --quiet, and we want to see any unexpected messages | ||
52 | @@ -79,8 +82,21 @@ mdadm() { | ||
53 | do_test() { | ||
54 | _script=$1 | ||
55 | _basename=`basename $_script` | ||
56 | + _broken=0 | ||
57 | + | ||
58 | if [ -f "$_script" ] | ||
59 | then | ||
60 | + if [ -f "${_script}.broken" ]; then | ||
61 | + _broken=1 | ||
62 | + _broken_msg=$(head -n1 "${_script}.broken" | tr -d '\n') | ||
63 | + if [ "$skipbroken" == "all" ]; then | ||
64 | + return | ||
65 | + elif [ "$skipbroken" == "always" ] && | ||
66 | + [[ "$_broken_msg" == *always* ]]; then | ||
67 | + return | ||
68 | + fi | ||
69 | + fi | ||
70 | + | ||
71 | rm -f $targetdir/stderr | ||
72 | # this might have been reset: restore the default. | ||
73 | echo 2000 > /proc/sys/dev/raid/speed_limit_max | ||
74 | @@ -97,10 +113,15 @@ do_test() { | ||
75 | else | ||
76 | save_log fail | ||
77 | _fail=1 | ||
78 | + if [ "$_broken" == "1" ]; then | ||
79 | + echo " (KNOWN BROKEN TEST: $_broken_msg)" | ||
80 | + fi | ||
81 | fi | ||
82 | [ "$savelogs" == "1" ] && | ||
83 | mv -f $targetdir/log $logdir/$_basename.log | ||
84 | - [ "$_fail" == "1" -a "$exitonerror" == "1" ] && exit 1 | ||
85 | + [ "$ctrl_c_error" == "1" ] && exit 1 | ||
86 | + [ "$_fail" == "1" -a "$exitonerror" == "1" \ | ||
87 | + -a "$_broken" == "0" ] && exit 1 | ||
88 | fi | ||
89 | } | ||
90 | |||
91 | @@ -117,6 +138,8 @@ do_help() { | ||
92 | --logdir=directory Directory to save all logfiles in | ||
93 | --save-logs Usually use with --logdir together | ||
94 | --keep-going | --no-error Don't stop on error, ie. run all tests | ||
95 | + --skip-broken Skip tests that are known to be broken | ||
96 | + --skip-always-broken Skip tests that are known to always fail | ||
97 | --dev=loop|lvm|ram|disk Use loop devices (default), LVM, RAM or disk | ||
98 | --disks= Provide a bunch of physical devices for test | ||
99 | --volgroup=name LVM volume group for LVM test | ||
100 | @@ -211,6 +234,12 @@ parse_args() { | ||
101 | --keep-going | --no-error ) | ||
102 | exitonerror=0 | ||
103 | ;; | ||
104 | + --skip-broken ) | ||
105 | + skipbroken=all | ||
106 | + ;; | ||
107 | + --skip-always-broken ) | ||
108 | + skipbroken=always | ||
109 | + ;; | ||
110 | --disable-multipath ) | ||
111 | unset MULTIPATH | ||
112 | ;; | ||
113 | @@ -275,7 +304,11 @@ main() { | ||
114 | if [ $script == "$testdir/11spare-migration" ];then | ||
115 | continue | ||
116 | fi | ||
117 | - do_test $script | ||
118 | + case $script in | ||
119 | + *.broken) ;; | ||
120 | + *) | ||
121 | + do_test $script | ||
122 | + esac | ||
123 | done | ||
124 | fi | ||
125 | |||
126 | -- | ||
127 | 2.39.1 | ||
128 | |||
diff --git a/meta/recipes-extended/mdadm/files/0006-tests-Add-broken-files-for-all-broken-tests.patch b/meta/recipes-extended/mdadm/files/0006-tests-Add-broken-files-for-all-broken-tests.patch deleted file mode 100644 index 115b23bac5..0000000000 --- a/meta/recipes-extended/mdadm/files/0006-tests-Add-broken-files-for-all-broken-tests.patch +++ /dev/null | |||
@@ -1,454 +0,0 @@ | |||
1 | From fd1c26ba129b069d9f73afaefdbe53683de3814a Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Gunthorpe <logang@deltatee.com> | ||
3 | Date: Wed, 22 Jun 2022 14:25:19 -0600 | ||
4 | Subject: [PATCH 6/6] tests: Add broken files for all broken tests | ||
5 | |||
6 | Each broken file contains the rough frequency of brokeness as well | ||
7 | as a brief explanation of what happens when it breaks. Estimates | ||
8 | of failure rates are not statistically significant and can vary | ||
9 | run to run. | ||
10 | |||
11 | This is really just a view from my window. Tests were done on a | ||
12 | small VM with the default loop devices, not real hardware. We've | ||
13 | seen different kernel configurations can cause bugs to appear as well | ||
14 | (ie. different block schedulers). It may also be that different race | ||
15 | conditions will be seen on machines with different performance | ||
16 | characteristics. | ||
17 | |||
18 | These annotations were done with the kernel currently in md/md-next: | ||
19 | |||
20 | facef3b96c5b ("md: Notify sysfs sync_completed in md_reap_sync_thread()") | ||
21 | |||
22 | Signed-off-by: Logan Gunthorpe <logang@deltatee.com> | ||
23 | Signed-off-by: Jes Sorensen <jes@trained-monkey.org> | ||
24 | |||
25 | Upstream-Status: Backport | ||
26 | |||
27 | Reference to upstream patch: | ||
28 | https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=daa86d663476 | ||
29 | |||
30 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
31 | --- | ||
32 | tests/01r5integ.broken | 7 ++++ | ||
33 | tests/01raid6integ.broken | 7 ++++ | ||
34 | tests/04r5swap.broken | 7 ++++ | ||
35 | tests/07autoassemble.broken | 8 ++++ | ||
36 | tests/07autodetect.broken | 5 +++ | ||
37 | tests/07changelevelintr.broken | 9 +++++ | ||
38 | tests/07changelevels.broken | 9 +++++ | ||
39 | tests/07reshape5intr.broken | 45 ++++++++++++++++++++++ | ||
40 | tests/07revert-grow.broken | 31 +++++++++++++++ | ||
41 | tests/07revert-shrink.broken | 9 +++++ | ||
42 | tests/07testreshape5.broken | 12 ++++++ | ||
43 | tests/09imsm-assemble.broken | 6 +++ | ||
44 | tests/09imsm-create-fail-rebuild.broken | 5 +++ | ||
45 | tests/09imsm-overlap.broken | 7 ++++ | ||
46 | tests/10ddf-assemble-missing.broken | 6 +++ | ||
47 | tests/10ddf-fail-create-race.broken | 7 ++++ | ||
48 | tests/10ddf-fail-two-spares.broken | 5 +++ | ||
49 | tests/10ddf-incremental-wrong-order.broken | 9 +++++ | ||
50 | tests/14imsm-r1_2d-grow-r1_3d.broken | 5 +++ | ||
51 | tests/14imsm-r1_2d-takeover-r0_2d.broken | 6 +++ | ||
52 | tests/18imsm-r10_4d-takeover-r0_2d.broken | 5 +++ | ||
53 | tests/18imsm-r1_2d-takeover-r0_1d.broken | 6 +++ | ||
54 | tests/19raid6auto-repair.broken | 5 +++ | ||
55 | tests/19raid6repair.broken | 5 +++ | ||
56 | 24 files changed, 226 insertions(+) | ||
57 | create mode 100644 tests/01r5integ.broken | ||
58 | create mode 100644 tests/01raid6integ.broken | ||
59 | create mode 100644 tests/04r5swap.broken | ||
60 | create mode 100644 tests/07autoassemble.broken | ||
61 | create mode 100644 tests/07autodetect.broken | ||
62 | create mode 100644 tests/07changelevelintr.broken | ||
63 | create mode 100644 tests/07changelevels.broken | ||
64 | create mode 100644 tests/07reshape5intr.broken | ||
65 | create mode 100644 tests/07revert-grow.broken | ||
66 | create mode 100644 tests/07revert-shrink.broken | ||
67 | create mode 100644 tests/07testreshape5.broken | ||
68 | create mode 100644 tests/09imsm-assemble.broken | ||
69 | create mode 100644 tests/09imsm-create-fail-rebuild.broken | ||
70 | create mode 100644 tests/09imsm-overlap.broken | ||
71 | create mode 100644 tests/10ddf-assemble-missing.broken | ||
72 | create mode 100644 tests/10ddf-fail-create-race.broken | ||
73 | create mode 100644 tests/10ddf-fail-two-spares.broken | ||
74 | create mode 100644 tests/10ddf-incremental-wrong-order.broken | ||
75 | create mode 100644 tests/14imsm-r1_2d-grow-r1_3d.broken | ||
76 | create mode 100644 tests/14imsm-r1_2d-takeover-r0_2d.broken | ||
77 | create mode 100644 tests/18imsm-r10_4d-takeover-r0_2d.broken | ||
78 | create mode 100644 tests/18imsm-r1_2d-takeover-r0_1d.broken | ||
79 | create mode 100644 tests/19raid6auto-repair.broken | ||
80 | create mode 100644 tests/19raid6repair.broken | ||
81 | |||
82 | diff --git a/tests/01r5integ.broken b/tests/01r5integ.broken | ||
83 | new file mode 100644 | ||
84 | index 0000000..2073763 | ||
85 | --- /dev/null | ||
86 | +++ b/tests/01r5integ.broken | ||
87 | @@ -0,0 +1,7 @@ | ||
88 | +fails rarely | ||
89 | + | ||
90 | +Fails about 1 in every 30 runs with a sha mismatch error: | ||
91 | + | ||
92 | + c49ab26e1b01def7874af9b8a6d6d0c29fdfafe6 /dev/md0 does not match | ||
93 | + 15dc2f73262f811ada53c65e505ceec9cf025cb9 /dev/md0 with /dev/loop3 | ||
94 | + missing | ||
95 | diff --git a/tests/01raid6integ.broken b/tests/01raid6integ.broken | ||
96 | new file mode 100644 | ||
97 | index 0000000..1df735f | ||
98 | --- /dev/null | ||
99 | +++ b/tests/01raid6integ.broken | ||
100 | @@ -0,0 +1,7 @@ | ||
101 | +fails infrequently | ||
102 | + | ||
103 | +Fails about 1 in 5 with a sha mismatch: | ||
104 | + | ||
105 | + 8286c2bc045ae2cfe9f8b7ae3a898fa25db6926f /dev/md0 does not match | ||
106 | + a083a0738b58caab37fd568b91b177035ded37df /dev/md0 with /dev/loop2 and | ||
107 | + /dev/loop3 missing | ||
108 | diff --git a/tests/04r5swap.broken b/tests/04r5swap.broken | ||
109 | new file mode 100644 | ||
110 | index 0000000..e38987d | ||
111 | --- /dev/null | ||
112 | +++ b/tests/04r5swap.broken | ||
113 | @@ -0,0 +1,7 @@ | ||
114 | +always fails | ||
115 | + | ||
116 | +Fails with errors: | ||
117 | + | ||
118 | + mdadm: /dev/loop0 has no superblock - assembly aborted | ||
119 | + | ||
120 | + ERROR: no recovery happening | ||
121 | diff --git a/tests/07autoassemble.broken b/tests/07autoassemble.broken | ||
122 | new file mode 100644 | ||
123 | index 0000000..8be0940 | ||
124 | --- /dev/null | ||
125 | +++ b/tests/07autoassemble.broken | ||
126 | @@ -0,0 +1,8 @@ | ||
127 | +always fails | ||
128 | + | ||
129 | +Prints lots of messages, but the array doesn't assemble. Error | ||
130 | +possibly related to: | ||
131 | + | ||
132 | + mdadm: /dev/md/1 is busy - skipping | ||
133 | + mdadm: no recogniseable superblock on /dev/md/testing:0 | ||
134 | + mdadm: /dev/md/2 is busy - skipping | ||
135 | diff --git a/tests/07autodetect.broken b/tests/07autodetect.broken | ||
136 | new file mode 100644 | ||
137 | index 0000000..294954a | ||
138 | --- /dev/null | ||
139 | +++ b/tests/07autodetect.broken | ||
140 | @@ -0,0 +1,5 @@ | ||
141 | +always fails | ||
142 | + | ||
143 | +Fails with error: | ||
144 | + | ||
145 | + ERROR: no resync happening | ||
146 | diff --git a/tests/07changelevelintr.broken b/tests/07changelevelintr.broken | ||
147 | new file mode 100644 | ||
148 | index 0000000..284b490 | ||
149 | --- /dev/null | ||
150 | +++ b/tests/07changelevelintr.broken | ||
151 | @@ -0,0 +1,9 @@ | ||
152 | +always fails | ||
153 | + | ||
154 | +Fails with errors: | ||
155 | + | ||
156 | + mdadm: this change will reduce the size of the array. | ||
157 | + use --grow --array-size first to truncate array. | ||
158 | + e.g. mdadm --grow /dev/md0 --array-size 56832 | ||
159 | + | ||
160 | + ERROR: no reshape happening | ||
161 | diff --git a/tests/07changelevels.broken b/tests/07changelevels.broken | ||
162 | new file mode 100644 | ||
163 | index 0000000..9b930d9 | ||
164 | --- /dev/null | ||
165 | +++ b/tests/07changelevels.broken | ||
166 | @@ -0,0 +1,9 @@ | ||
167 | +always fails | ||
168 | + | ||
169 | +Fails with errors: | ||
170 | + | ||
171 | + mdadm: /dev/loop0 is smaller than given size. 18976K < 19968K + metadata | ||
172 | + mdadm: /dev/loop1 is smaller than given size. 18976K < 19968K + metadata | ||
173 | + mdadm: /dev/loop2 is smaller than given size. 18976K < 19968K + metadata | ||
174 | + | ||
175 | + ERROR: /dev/md0 isn't a block device. | ||
176 | diff --git a/tests/07reshape5intr.broken b/tests/07reshape5intr.broken | ||
177 | new file mode 100644 | ||
178 | index 0000000..efe52a6 | ||
179 | --- /dev/null | ||
180 | +++ b/tests/07reshape5intr.broken | ||
181 | @@ -0,0 +1,45 @@ | ||
182 | +always fails | ||
183 | + | ||
184 | +This patch, recently added to md-next causes the test to always fail: | ||
185 | + | ||
186 | +7e6ba434cc60 ("md: don't unregister sync_thread with reconfig_mutex | ||
187 | +held") | ||
188 | + | ||
189 | +The new error is simply: | ||
190 | + | ||
191 | + ERROR: no reshape happening | ||
192 | + | ||
193 | +Before the patch, the error seen is below. | ||
194 | + | ||
195 | +-- | ||
196 | + | ||
197 | +fails infrequently | ||
198 | + | ||
199 | +Fails roughly 1 in 4 runs with errors: | ||
200 | + | ||
201 | + mdadm: Merging with already-assembled /dev/md/0 | ||
202 | + mdadm: cannot re-read metadata from /dev/loop6 - aborting | ||
203 | + | ||
204 | + ERROR: no reshape happening | ||
205 | + | ||
206 | +Also have seen a random deadlock: | ||
207 | + | ||
208 | + INFO: task mdadm:109702 blocked for more than 30 seconds. | ||
209 | + Not tainted 5.18.0-rc3-eid-vmlocalyes-dbg-00095-g3c2b5427979d #2040 | ||
210 | + "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. | ||
211 | + task:mdadm state:D stack: 0 pid:109702 ppid: 1 flags:0x00004000 | ||
212 | + Call Trace: | ||
213 | + <TASK> | ||
214 | + __schedule+0x67e/0x13b0 | ||
215 | + schedule+0x82/0x110 | ||
216 | + mddev_suspend+0x2e1/0x330 | ||
217 | + suspend_lo_store+0xbd/0x140 | ||
218 | + md_attr_store+0xcb/0x130 | ||
219 | + sysfs_kf_write+0x89/0xb0 | ||
220 | + kernfs_fop_write_iter+0x202/0x2c0 | ||
221 | + new_sync_write+0x222/0x330 | ||
222 | + vfs_write+0x3bc/0x4d0 | ||
223 | + ksys_write+0xd9/0x180 | ||
224 | + __x64_sys_write+0x43/0x50 | ||
225 | + do_syscall_64+0x3b/0x90 | ||
226 | + entry_SYSCALL_64_after_hwframe+0x44/0xae | ||
227 | diff --git a/tests/07revert-grow.broken b/tests/07revert-grow.broken | ||
228 | new file mode 100644 | ||
229 | index 0000000..9b6db86 | ||
230 | --- /dev/null | ||
231 | +++ b/tests/07revert-grow.broken | ||
232 | @@ -0,0 +1,31 @@ | ||
233 | +always fails | ||
234 | + | ||
235 | +This patch, recently added to md-next causes the test to always fail: | ||
236 | + | ||
237 | +7e6ba434cc60 ("md: don't unregister sync_thread with reconfig_mutex held") | ||
238 | + | ||
239 | +The errors are: | ||
240 | + | ||
241 | + mdadm: No active reshape to revert on /dev/loop0 | ||
242 | + ERROR: active raid5 not found | ||
243 | + | ||
244 | +Before the patch, the error seen is below. | ||
245 | + | ||
246 | +-- | ||
247 | + | ||
248 | +fails rarely | ||
249 | + | ||
250 | +Fails about 1 in every 30 runs with errors: | ||
251 | + | ||
252 | + mdadm: Merging with already-assembled /dev/md/0 | ||
253 | + mdadm: backup file /tmp/md-backup inaccessible: No such file or directory | ||
254 | + mdadm: failed to add /dev/loop1 to /dev/md/0: Invalid argument | ||
255 | + mdadm: failed to add /dev/loop2 to /dev/md/0: Invalid argument | ||
256 | + mdadm: failed to add /dev/loop3 to /dev/md/0: Invalid argument | ||
257 | + mdadm: failed to add /dev/loop0 to /dev/md/0: Invalid argument | ||
258 | + mdadm: /dev/md/0 assembled from 1 drive - need all 5 to start it | ||
259 | + (use --run to insist). | ||
260 | + | ||
261 | + grep: /sys/block/md*/md/sync_action: No such file or directory | ||
262 | + | ||
263 | + ERROR: active raid5 not found | ||
264 | diff --git a/tests/07revert-shrink.broken b/tests/07revert-shrink.broken | ||
265 | new file mode 100644 | ||
266 | index 0000000..c33c39e | ||
267 | --- /dev/null | ||
268 | +++ b/tests/07revert-shrink.broken | ||
269 | @@ -0,0 +1,9 @@ | ||
270 | +always fails | ||
271 | + | ||
272 | +Fails with errors: | ||
273 | + | ||
274 | + mdadm: this change will reduce the size of the array. | ||
275 | + use --grow --array-size first to truncate array. | ||
276 | + e.g. mdadm --grow /dev/md0 --array-size 53760 | ||
277 | + | ||
278 | + ERROR: active raid5 not found | ||
279 | diff --git a/tests/07testreshape5.broken b/tests/07testreshape5.broken | ||
280 | new file mode 100644 | ||
281 | index 0000000..a8ce03e | ||
282 | --- /dev/null | ||
283 | +++ b/tests/07testreshape5.broken | ||
284 | @@ -0,0 +1,12 @@ | ||
285 | +always fails | ||
286 | + | ||
287 | +Test seems to run 'test_stripe' at $dir directory, but $dir is never | ||
288 | +set. If $dir is adjusted to $PWD, the test still fails with: | ||
289 | + | ||
290 | + mdadm: /dev/loop2 is not suitable for this array. | ||
291 | + mdadm: create aborted | ||
292 | + ++ return 1 | ||
293 | + ++ cmp -s -n 8192 /dev/md0 /tmp/RandFile | ||
294 | + ++ echo cmp failed | ||
295 | + cmp failed | ||
296 | + ++ exit 2 | ||
297 | diff --git a/tests/09imsm-assemble.broken b/tests/09imsm-assemble.broken | ||
298 | new file mode 100644 | ||
299 | index 0000000..a6d4d5c | ||
300 | --- /dev/null | ||
301 | +++ b/tests/09imsm-assemble.broken | ||
302 | @@ -0,0 +1,6 @@ | ||
303 | +fails infrequently | ||
304 | + | ||
305 | +Fails roughly 1 in 10 runs with errors: | ||
306 | + | ||
307 | + mdadm: /dev/loop2 is still in use, cannot remove. | ||
308 | + /dev/loop2 removal from /dev/md/container should have succeeded | ||
309 | diff --git a/tests/09imsm-create-fail-rebuild.broken b/tests/09imsm-create-fail-rebuild.broken | ||
310 | new file mode 100644 | ||
311 | index 0000000..40c4b29 | ||
312 | --- /dev/null | ||
313 | +++ b/tests/09imsm-create-fail-rebuild.broken | ||
314 | @@ -0,0 +1,5 @@ | ||
315 | +always fails | ||
316 | + | ||
317 | +Fails with error: | ||
318 | + | ||
319 | + **Error**: Array size mismatch - expected 3072, actual 16384 | ||
320 | diff --git a/tests/09imsm-overlap.broken b/tests/09imsm-overlap.broken | ||
321 | new file mode 100644 | ||
322 | index 0000000..e7ccab7 | ||
323 | --- /dev/null | ||
324 | +++ b/tests/09imsm-overlap.broken | ||
325 | @@ -0,0 +1,7 @@ | ||
326 | +always fails | ||
327 | + | ||
328 | +Fails with errors: | ||
329 | + | ||
330 | + **Error**: Offset mismatch - expected 15360, actual 0 | ||
331 | + **Error**: Offset mismatch - expected 15360, actual 0 | ||
332 | + /dev/md/vol3 failed check | ||
333 | diff --git a/tests/10ddf-assemble-missing.broken b/tests/10ddf-assemble-missing.broken | ||
334 | new file mode 100644 | ||
335 | index 0000000..bfd8d10 | ||
336 | --- /dev/null | ||
337 | +++ b/tests/10ddf-assemble-missing.broken | ||
338 | @@ -0,0 +1,6 @@ | ||
339 | +always fails | ||
340 | + | ||
341 | +Fails with errors: | ||
342 | + | ||
343 | + ERROR: /dev/md/vol0 has unexpected state on /dev/loop10 | ||
344 | + ERROR: unexpected number of online disks on /dev/loop10 | ||
345 | diff --git a/tests/10ddf-fail-create-race.broken b/tests/10ddf-fail-create-race.broken | ||
346 | new file mode 100644 | ||
347 | index 0000000..6c0df02 | ||
348 | --- /dev/null | ||
349 | +++ b/tests/10ddf-fail-create-race.broken | ||
350 | @@ -0,0 +1,7 @@ | ||
351 | +usually fails | ||
352 | + | ||
353 | +Fails about 9 out of 10 times with many errors: | ||
354 | + | ||
355 | + mdadm: cannot open MISSING: No such file or directory | ||
356 | + ERROR: non-degraded array found | ||
357 | + ERROR: disk 0 not marked as failed in meta data | ||
358 | diff --git a/tests/10ddf-fail-two-spares.broken b/tests/10ddf-fail-two-spares.broken | ||
359 | new file mode 100644 | ||
360 | index 0000000..eeea56d | ||
361 | --- /dev/null | ||
362 | +++ b/tests/10ddf-fail-two-spares.broken | ||
363 | @@ -0,0 +1,5 @@ | ||
364 | +fails infrequently | ||
365 | + | ||
366 | +Fails roughly 1 in 3 with error: | ||
367 | + | ||
368 | + ERROR: /dev/md/vol1 should be optimal in meta data | ||
369 | diff --git a/tests/10ddf-incremental-wrong-order.broken b/tests/10ddf-incremental-wrong-order.broken | ||
370 | new file mode 100644 | ||
371 | index 0000000..a5af3ba | ||
372 | --- /dev/null | ||
373 | +++ b/tests/10ddf-incremental-wrong-order.broken | ||
374 | @@ -0,0 +1,9 @@ | ||
375 | +always fails | ||
376 | + | ||
377 | +Fails with errors: | ||
378 | + ERROR: sha1sum of /dev/md/vol0 has changed | ||
379 | + ERROR: /dev/md/vol0 has unexpected state on /dev/loop10 | ||
380 | + ERROR: unexpected number of online disks on /dev/loop10 | ||
381 | + ERROR: /dev/md/vol0 has unexpected state on /dev/loop8 | ||
382 | + ERROR: unexpected number of online disks on /dev/loop8 | ||
383 | + ERROR: sha1sum of /dev/md/vol0 has changed | ||
384 | diff --git a/tests/14imsm-r1_2d-grow-r1_3d.broken b/tests/14imsm-r1_2d-grow-r1_3d.broken | ||
385 | new file mode 100644 | ||
386 | index 0000000..4ef1d40 | ||
387 | --- /dev/null | ||
388 | +++ b/tests/14imsm-r1_2d-grow-r1_3d.broken | ||
389 | @@ -0,0 +1,5 @@ | ||
390 | +always fails | ||
391 | + | ||
392 | +Fails with error: | ||
393 | + | ||
394 | + mdadm/tests/func.sh: line 325: dvsize/chunk: division by 0 (error token is "chunk") | ||
395 | diff --git a/tests/14imsm-r1_2d-takeover-r0_2d.broken b/tests/14imsm-r1_2d-takeover-r0_2d.broken | ||
396 | new file mode 100644 | ||
397 | index 0000000..89cd4e5 | ||
398 | --- /dev/null | ||
399 | +++ b/tests/14imsm-r1_2d-takeover-r0_2d.broken | ||
400 | @@ -0,0 +1,6 @@ | ||
401 | +always fails | ||
402 | + | ||
403 | +Fails with error: | ||
404 | + | ||
405 | + tests/func.sh: line 325: dvsize/chunk: division by 0 (error token | ||
406 | + is "chunk") | ||
407 | diff --git a/tests/18imsm-r10_4d-takeover-r0_2d.broken b/tests/18imsm-r10_4d-takeover-r0_2d.broken | ||
408 | new file mode 100644 | ||
409 | index 0000000..a27399f | ||
410 | --- /dev/null | ||
411 | +++ b/tests/18imsm-r10_4d-takeover-r0_2d.broken | ||
412 | @@ -0,0 +1,5 @@ | ||
413 | +fails rarely | ||
414 | + | ||
415 | +Fails about 1 run in 100 with message: | ||
416 | + | ||
417 | + ERROR: size is wrong for /dev/md/vol0: 2 * 5120 (chunk=128) = 20480, not 0 | ||
418 | diff --git a/tests/18imsm-r1_2d-takeover-r0_1d.broken b/tests/18imsm-r1_2d-takeover-r0_1d.broken | ||
419 | new file mode 100644 | ||
420 | index 0000000..aa1982e | ||
421 | --- /dev/null | ||
422 | +++ b/tests/18imsm-r1_2d-takeover-r0_1d.broken | ||
423 | @@ -0,0 +1,6 @@ | ||
424 | +always fails | ||
425 | + | ||
426 | +Fails with error: | ||
427 | + | ||
428 | + tests/func.sh: line 325: dvsize/chunk: division by 0 (error token | ||
429 | + is "chunk") | ||
430 | diff --git a/tests/19raid6auto-repair.broken b/tests/19raid6auto-repair.broken | ||
431 | new file mode 100644 | ||
432 | index 0000000..e91a142 | ||
433 | --- /dev/null | ||
434 | +++ b/tests/19raid6auto-repair.broken | ||
435 | @@ -0,0 +1,5 @@ | ||
436 | +always fails | ||
437 | + | ||
438 | +Fails with: | ||
439 | + | ||
440 | + "should detect errors" | ||
441 | diff --git a/tests/19raid6repair.broken b/tests/19raid6repair.broken | ||
442 | new file mode 100644 | ||
443 | index 0000000..e91a142 | ||
444 | --- /dev/null | ||
445 | +++ b/tests/19raid6repair.broken | ||
446 | @@ -0,0 +1,5 @@ | ||
447 | +always fails | ||
448 | + | ||
449 | +Fails with: | ||
450 | + | ||
451 | + "should detect errors" | ||
452 | -- | ||
453 | 2.39.1 | ||
454 | |||
diff --git a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch index fa90647489..b758fcd0ab 100644 --- a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch +++ b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From adb75f0bdec97dbe4aa15cc988d349775f7995ff Mon Sep 17 00:00:00 2001 | 1 | From 319b3191f088cea7b0fb6038ab7625d5e049dcf7 Mon Sep 17 00:00:00 2001 |
2 | From: "martin f. krafft" <madduck@debian.org> | 2 | From: "martin f. krafft" <madduck@debian.org> |
3 | Date: Mon, 3 Jan 2022 19:14:12 +0000 | 3 | Date: Mon, 3 Jan 2022 19:14:12 +0000 |
4 | Subject: [PATCH] Remove -Werror from compiler flags | 4 | Subject: [PATCH] Remove -Werror from compiler flags |
@@ -10,21 +10,20 @@ use it to beautify the code, but remove it for out builds. | |||
10 | Signed-off-by: martin f. krafft <madduck@debian.org> | 10 | Signed-off-by: martin f. krafft <madduck@debian.org> |
11 | 11 | ||
12 | Upstream-Status: Pending | 12 | Upstream-Status: Pending |
13 | |||
14 | --- | 13 | --- |
15 | Makefile | 2 +- | 14 | Makefile | 2 +- |
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
17 | 16 | ||
18 | diff --git a/Makefile b/Makefile | 17 | diff --git a/Makefile b/Makefile |
19 | index 716c97c..40354ea 100644 | 18 | index 9ab6a65..1141971 100644 |
20 | --- a/Makefile | 19 | --- a/Makefile |
21 | +++ b/Makefile | 20 | +++ b/Makefile |
22 | @@ -50,7 +50,7 @@ ifeq ($(origin CC),default) | 21 | @@ -50,7 +50,7 @@ ifeq ($(origin CC),default) |
23 | CC := $(CROSS_COMPILE)gcc | 22 | CC := $(CROSS_COMPILE)gcc |
24 | endif | 23 | endif |
25 | CXFLAGS ?= -ggdb | 24 | CXFLAGS ?= -ggdb |
26 | -CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter | 25 | -CWFLAGS ?= -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds |
27 | +CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter | 26 | +CWFLAGS ?= -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds |
28 | ifdef WARN_UNUSED | 27 | ifdef WARN_UNUSED |
29 | CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 | 28 | CWFLAGS += -Wp -O3 |
30 | endif | 29 | endif |
diff --git a/meta/recipes-extended/mdadm/files/include_sysmacros.patch b/meta/recipes-extended/mdadm/files/include_sysmacros.patch deleted file mode 100644 index 8a1d8342d8..0000000000 --- a/meta/recipes-extended/mdadm/files/include_sysmacros.patch +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | include sys/sysmacros.h for major/minor macro definitions | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | --- a/mdadm.h | ||
6 | +++ b/mdadm.h | ||
7 | @@ -35,6 +35,7 @@ extern __off64_t lseek64 __P ((int __fd, | ||
8 | |||
9 | #include <sys/types.h> | ||
10 | #include <sys/stat.h> | ||
11 | +#include <sys/sysmacros.h> | ||
12 | #include <stdint.h> | ||
13 | #include <stdlib.h> | ||
14 | #include <time.h> | ||
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch index 7a2c888701..ecd1f037d0 100644 --- a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch +++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001 | 1 | From ca91d9fc07943f209988411f2596e4b69828f208 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> | 2 | From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> |
3 | Date: Sun, 15 Mar 2015 09:02:14 +0000 | 3 | Date: Sun, 15 Mar 2015 09:02:14 +0000 |
4 | Subject: [PATCH] mdadm: Fix build in x32 ABI | 4 | Subject: [PATCH] mdadm: Fix build in x32 ABI |
@@ -12,16 +12,15 @@ data type in x32 ABI is long long int. | |||
12 | Upstream-Status: Pending | 12 | Upstream-Status: Pending |
13 | 13 | ||
14 | Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> | 14 | Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> |
15 | |||
16 | --- | 15 | --- |
17 | monitor.c | 5 ++++- | 16 | monitor.c | 5 ++++- |
18 | 1 file changed, 4 insertions(+), 1 deletion(-) | 17 | 1 file changed, 4 insertions(+), 1 deletion(-) |
19 | 18 | ||
20 | diff --git a/monitor.c b/monitor.c | 19 | diff --git a/monitor.c b/monitor.c |
21 | index 81537ed..7c33382 100644 | 20 | index 4acec67..8dcdfd6 100644 |
22 | --- a/monitor.c | 21 | --- a/monitor.c |
23 | +++ b/monitor.c | 22 | +++ b/monitor.c |
24 | @@ -445,9 +445,12 @@ static int read_and_act(struct active_array *a, fd_set *fds) | 23 | @@ -447,9 +447,12 @@ static int read_and_act(struct active_array *a, fd_set *fds) |
25 | if (FD_ISSET(mdi->bb_fd, fds)) | 24 | if (FD_ISSET(mdi->bb_fd, fds)) |
26 | check_for_cleared_bb(a, mdi); | 25 | check_for_cleared_bb(a, mdi); |
27 | } | 26 | } |
diff --git a/meta/recipes-extended/mdadm/mdadm_4.2.bb b/meta/recipes-extended/mdadm/mdadm_4.3.bb index 6f87249398..fc58fcb86c 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.2.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.3.bb | |||
@@ -17,31 +17,15 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ | |||
17 | file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \ | 17 | file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \ |
18 | file://0001-fix-gcc-8-format-truncation-warning.patch \ | 18 | file://0001-fix-gcc-8-format-truncation-warning.patch \ |
19 | file://debian-no-Werror.patch \ | 19 | file://debian-no-Werror.patch \ |
20 | file://0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch \ | ||
21 | file://mdadm.init \ | 20 | file://mdadm.init \ |
22 | file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \ | 21 | file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \ |
23 | file://include_sysmacros.patch \ | ||
24 | file://0001-mdadm-skip-test-11spare-migration.patch \ | ||
25 | file://0001-Fix-parsing-of-r-in-monitor-manager-mode.patch \ | ||
26 | file://0001-Makefile-install-mdcheck.patch \ | 22 | file://0001-Makefile-install-mdcheck.patch \ |
27 | file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \ | 23 | file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \ |
28 | file://0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ | 24 | file://0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch \ |
29 | file://0001-mdadm-Fix-optional-write-behind-parameter.patch \ | 25 | file://0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch \ |
30 | file://0001-tests-02lineargrow-clear-the-superblock-at-every-ite.patch \ | ||
31 | file://0001-tests-00raid0-add-a-test-that-validates-raid0-with-l.patch \ | ||
32 | file://0001-tests-fix-raid0-tests-for-0.90-metadata.patch \ | ||
33 | file://0001-tests-00readonly-Run-udevadm-settle-before-setting-r.patch \ | ||
34 | file://0001-tests-04update-metadata-avoid-passing-chunk-size-to.patch \ | ||
35 | file://0001-DDF-Cleanup-validate_geometry_ddf_container.patch \ | ||
36 | file://0002-DDF-Fix-NULL-pointer-dereference-in-validate_geometr.patch \ | ||
37 | file://0003-mdadm-Grow-Fix-use-after-close-bug-by-closing-after-.patch \ | ||
38 | file://0004-monitor-Avoid-segfault-when-calling-NULL-get_bad_blo.patch \ | ||
39 | file://0005-mdadm-test-Mark-and-ignore-broken-test-failures.patch \ | ||
40 | file://0006-tests-Add-broken-files-for-all-broken-tests.patch \ | ||
41 | file://0001-tests-add-.broken-files-for-04update-uuid-and-07reve.patch \ | ||
42 | " | 26 | " |
43 | 27 | ||
44 | SRC_URI[sha256sum] = "461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d" | 28 | SRC_URI[sha256sum] = "416727ae1f1080ea6e3090cea36dd076826fc369151e36ab736557ba92196f9f" |
45 | 29 | ||
46 | inherit autotools-brokensep ptest systemd | 30 | inherit autotools-brokensep ptest systemd |
47 | 31 | ||
@@ -59,7 +43,7 @@ CFLAGS:append:mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' | |||
59 | CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' | 43 | CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' |
60 | 44 | ||
61 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \ | 45 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \ |
62 | BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev"' | 46 | BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}"' |
63 | 47 | ||
64 | DEBUG_OPTIMIZATION:append = " -Wno-error" | 48 | DEBUG_OPTIMIZATION:append = " -Wno-error" |
65 | 49 | ||
@@ -91,7 +75,6 @@ do_install_ptest() { | |||
91 | cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests | 75 | cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests |
92 | cp ${S}/test ${D}${PTEST_PATH} | 76 | cp ${S}/test ${D}${PTEST_PATH} |
93 | sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test | 77 | sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test |
94 | sed -e 's!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/tests/* | ||
95 | sed -i -e '/echo -ne "$_script... "/d' \ | 78 | sed -i -e '/echo -ne "$_script... "/d' \ |
96 | -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \ | 79 | -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \ |
97 | -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \ | 80 | -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \ |