summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2017-01-13 14:57:09 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 22:47:21 +0000
commit17a92e1fb0494d8026219b372af9a28006f9bc53 (patch)
tree2c700748ebb064c5962a8365628b7070bc602af4 /meta
parent2068a1e37a7a048ee7b01a7da016009b5e69f620 (diff)
downloadpoky-17a92e1fb0494d8026219b372af9a28006f9bc53.tar.gz
mdadm: upgrade to version 4.0
3.4 -> 4.0 Removed the following upstreamed or backported patches: a) 0001-Fix-some-type-comparison-problems.patch b) 0001-Fix-typo-in-comparision.patch c) 0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch d) 0001-raid6check-Fix-if-else-indentation.patch e) 0001-util.c-include-poll.h-instead-of-sys-poll.h.patch f) mdadm-3.2.2_fix_for_x32.patch (From OE-Core rev: b32f5098fc06c96d9331abe0f4ff9cc7c7c08c76) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch50
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch86
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch55
-rw-r--r--meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch37
-rw-r--r--meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch45
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch23
-rw-r--r--meta/recipes-extended/mdadm/mdadm_4.0.bb (renamed from meta/recipes-extended/mdadm/mdadm_3.4.bb)10
7 files changed, 2 insertions, 304 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch b/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
deleted file mode 100644
index f829467a16..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From 835baf02fd42012bbc0603dffb1f80c6ecf0fb9e Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Mon, 8 Feb 2016 11:18:52 +0200
4Subject: [PATCH] Fix some type comparison problems
5
6As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed
7timestamps will overflow in the year 2038. It already changed the
8utime and ctime in struct mdu_array_info_s from int to unsigned
9int. So we need to change the values that compared with them to
10unsigned int too.
11
12Upstream-Status: Backport
13
14Signed-off-by: : Xiao Ni <xni@redhat.com>
15Signed-off-by: Maxin B. John <maxin.john@intel.com>
16---
17
18 Monitor.c | 2 +-
19 util.c | 2 +-
20 2 files changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/Monitor.c b/Monitor.c
23index f19c2e5..6df80f9 100644
24--- a/Monitor.c
25+++ b/Monitor.c
26@@ -33,7 +33,7 @@
27 struct state {
28 char *devname;
29 char devnm[32]; /* to sync with mdstat info */
30- long utime;
31+ unsigned int utime;
32 int err;
33 char *spare_group;
34 int active, working, failed, spare, raid;
35diff --git a/util.c b/util.c
36index 3e6d293..96a806d 100644
37--- a/util.c
38+++ b/util.c
39@@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
40 */
41 struct superswitch *ss;
42 struct supertype *st;
43- time_t besttime = 0;
44+ unsigned int besttime = 0;
45 int bestsuper = -1;
46 int i;
47
48--
492.4.0
50
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch b/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch
deleted file mode 100644
index df70b1cf44..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1From 18d360d74271a066a849bc1fba4f10dbb23ed251 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Sep 2015 08:17:42 +0000
4Subject: [PATCH] Fix typo in comparision
5
6error: comparison of array 'devnm' equal to a null pointer is always false
7
8User bitwise '&' operator as it is a mask
9
10Fixes
11error: use of logical '&&' with constant operand
12
13Remove extraneous parens
14
15error: equality comparison with extraneous parentheses
16
17Remove dead code
18
19restripe.c:465:21: error: explicitly assigning value of variable of type 'int' to itself
20
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22---
23Upstream-Status: Pending
24
25 mdmon.h | 2 +-
26 mdopen.c | 2 +-
27 restripe.c | 3 ---
28 super-intel.c | 2 +-
29 4 files changed, 3 insertions(+), 6 deletions(-)
30
31diff --git a/mdmon.h b/mdmon.h
32index aa750c6..0b08c3d 100644
33--- a/mdmon.h
34+++ b/mdmon.h
35@@ -101,7 +101,7 @@ static inline int is_resync_complete(struct mdinfo *array)
36 break;
37 case 10:
38 l = array->array.layout;
39- ncopies = (l & 0xff) * ((l >> 8) && 0xff);
40+ ncopies = (l & 0xff) * ((l >> 8) & 0xff);
41 sync_size = array->component_size * array->array.raid_disks;
42 sync_size /= ncopies;
43 break;
44diff --git a/mdopen.c b/mdopen.c
45index 28410f4..c5ee2a6 100644
46--- a/mdopen.c
47+++ b/mdopen.c
48@@ -318,7 +318,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
49 else if (num < 0) {
50 /* need to choose a free number. */
51 char *_devnm = find_free_devnm(use_mdp);
52- if (devnm == NULL) {
53+ if (_devnm == NULL) {
54 pr_err("No avail md devices - aborting\n");
55 return -1;
56 }
57diff --git a/restripe.c b/restripe.c
58index 4d92190..cfe9666 100644
59--- a/restripe.c
60+++ b/restripe.c
61@@ -461,9 +461,6 @@ int raid6_check_disks(int data_disks, int start, int chunk_size,
62 curr_broken_disk = diskD;
63 }
64
65- if((Px == 0) && (Qx == 0))
66- curr_broken_disk = curr_broken_disk;
67-
68 if(curr_broken_disk >= data_disks + 2)
69 broken_status = 2;
70
71diff --git a/super-intel.c b/super-intel.c
72index 3f812d6..1838012 100644
73--- a/super-intel.c
74+++ b/super-intel.c
75@@ -10027,7 +10027,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
76 geo->size = max_size;
77 }
78
79- if ((direction == ROLLBACK_METADATA_CHANGES)) {
80+ if (direction == ROLLBACK_METADATA_CHANGES) {
81 /* accept size for rollback only
82 */
83 } else {
84--
852.5.1
86
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
deleted file mode 100644
index 1395473981..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Fri, 5 Feb 2016 18:06:32 +0200
4Subject: [PATCH] mdadm.h: bswap is already defined in uclibc
5
6Fixes this build error:
7
8| In file included from mdadm.c:28:0:
9| mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
10| #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
11| ^
12
13Upstream-Status: Submitted
14
15Signed-off-by: Maxin B. John <maxin.john@intel.com>
16---
17 mdadm.h | 9 +++++++++
18 1 file changed, 9 insertions(+)
19
20diff --git a/mdadm.h b/mdadm.h
21index dd02be7..230e60f 100755
22--- a/mdadm.h
23+++ b/mdadm.h
24@@ -139,12 +139,20 @@ struct dlm_lksb {
25 * and there is no standard conversion function so... */
26 /* And dietlibc doesn't think byteswap is ok, so.. */
27 /* #include <byteswap.h> */
28+
29+#ifndef bswap_16
30 #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
31 ((x) & 0xff00U) >> 8)
32+#endif
33+
34+#ifndef bswap_32
35 #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
36 ((x) & 0xff000000U) >> 24 | \
37 ((x) & 0x0000ff00U) << 8 | \
38 ((x) & 0x00ff0000U) >> 8)
39+#endif
40+
41+#ifndef bswap_64
42 #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
43 ((x) & 0xff00000000000000ULL) >> 56 | \
44 ((x) & 0x000000000000ff00ULL) << 40 | \
45@@ -153,6 +161,7 @@ struct dlm_lksb {
46 ((x) & 0x0000ff0000000000ULL) >> 24 | \
47 ((x) & 0x00000000ff000000ULL) << 8 | \
48 ((x) & 0x000000ff00000000ULL) >> 8)
49+#endif
50
51 #if !defined(__KLIBC__)
52 #if BYTE_ORDER == LITTLE_ENDIAN
53--
542.4.0
55
diff --git a/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch b/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch
deleted file mode 100644
index 0b34b8491f..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 1b0aa1debf6fbe9923c9aac671d2894f76c32f9d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 20 Apr 2016 16:38:13 +0000
4Subject: [PATCH] raid6check: Fix if-else indentation
5
6gcc 6 warns about ambiguity due to this indentation
7| raid6check.c: In function 'manual_repair':
8| raid6check.c:267:4: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
9| else
10| ^~~~
11| raid6check.c:269:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
12| printf("Repairing D(%d) and P\n", failed_data);
13| ^~~~~~
14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17Upstream-Status: Submitted
18
19 raid6check.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/raid6check.c b/raid6check.c
23index ad7ffe7..409b1b6 100644
24--- a/raid6check.c
25+++ b/raid6check.c
26@@ -266,7 +266,7 @@ int manual_repair(int chunk_size, int syndrome_disks,
27 failed_data = failed_slot2;
28 else
29 failed_data = failed_slot1;
30- printf("Repairing D(%d) and P\n", failed_data);
31+ printf("Repairing D(%d) and P\n", failed_data);
32 raid6_datap_recov(syndrome_disks+2, chunk_size,
33 failed_data, (uint8_t**)blocks, 1);
34 } else {
35--
361.9.1
37
diff --git a/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch b/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
deleted file mode 100644
index d5cf003745..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 2645673a7ea948a1297d5b8f0daab29b898f044f Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Fri, 5 Feb 2016 17:14:04 +0200
4Subject: [PATCH] util.c: include poll.h instead of sys/poll.h
5
6This fixes a compile warning when building with musl:
7
8 In file included from util.c:27:0:
9 |
10 qemux86-64/usr/include/sys/poll.h:1:2:
11 error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
12 [-Werror=cpp]
13 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
14 | ^
15
16Upstream-Status: Accepted
17
18Signed-off-by: Maxin B. John <maxin.john@intel.com>
19---
20 util.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/util.c b/util.c
24index 970d484..3e6d293 100644
25--- a/util.c
26+++ b/util.c
27@@ -24,7 +24,6 @@
28
29 #include "mdadm.h"
30 #include "md_p.h"
31-#include <sys/poll.h>
32 #include <sys/socket.h>
33 #include <sys/utsname.h>
34 #include <sys/wait.h>
35@@ -32,6 +31,7 @@
36 #include <sys/resource.h>
37 #include <sys/vfs.h>
38 #include <linux/magic.h>
39+#include <poll.h>
40 #include <ctype.h>
41 #include <dirent.h>
42 #include <signal.h>
43--
442.4.0
45
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
deleted file mode 100644
index 84c382def6..0000000000
--- a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Upstream-Status: Accepted
2
3By hardcoding CC's definition in the Makefile, all the gcc parameters
4set by tune settings are lost. Causing compile failure with x32 toolchain
5
6As the bitbake defined CC is good, there is no need to redfine CC in the
7make file, hence making the CC definition in the Makefile conditional.
8
9Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
10
11Index: mdadm-3.3/Makefile
12===================================================================
13--- mdadm-3.3.orig/Makefile 2013-09-03 07:47:47.000000000 +0300
14+++ mdadm-3.3/Makefile 2013-10-16 16:44:23.542295487 +0300
15@@ -41,7 +41,7 @@
16
17 KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
18
19-CC = $(CROSS_COMPILE)gcc
20+CC ?= $(CROSS_COMPILE)gcc
21 CXFLAGS ?= -ggdb
22 CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
23 ifdef WARN_UNUSED
diff --git a/meta/recipes-extended/mdadm/mdadm_3.4.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb
index 7bf15b51be..c2288995ba 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.4.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb
@@ -9,22 +9,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
9 9
10 10
11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ 11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
12 file://mdadm-3.2.2_fix_for_x32.patch \
13 file://gcc-4.9.patch \ 12 file://gcc-4.9.patch \
14 file://mdadm-3.3.2_x32_abi_time_t.patch \ 13 file://mdadm-3.3.2_x32_abi_time_t.patch \
15 file://0001-Fix-typo-in-comparision.patch \
16 file://mdadm-fix-ptest-build-errors.patch \ 14 file://mdadm-fix-ptest-build-errors.patch \
17 file://0001-util.c-include-poll.h-instead-of-sys-poll.h.patch \
18 file://0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch \
19 file://0001-Fix-some-type-comparison-problems.patch \
20 file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \ 15 file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
21 file://run-ptest \ 16 file://run-ptest \
22 file://0001-raid6check-Fix-if-else-indentation.patch \
23 file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \ 17 file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
24 file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \ 18 file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \
25 " 19 "
26SRC_URI[md5sum] = "04b8b21f637540350f8517c7e68d3c63" 20SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d"
27SRC_URI[sha256sum] = "27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808" 21SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9"
28 22
29CFLAGS += "-fno-strict-aliasing" 23CFLAGS += "-fno-strict-aliasing"
30inherit autotools-brokensep 24inherit autotools-brokensep