summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2016-02-10 18:35:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:27:50 +0000
commitf0d5478de47cb7dd45141a279f067be869a2f4c5 (patch)
treeb342fcc0c9ddef95918745e9eceed377d0738422 /meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
parent79d5041a9c9ff16ca254d99f87c9ad0f178d48e6 (diff)
downloadpoky-f0d5478de47cb7dd45141a279f067be869a2f4c5.tar.gz
mdadm: update to version 3.4
3.3.4 -> 3.4 a) Removed the following upstreamed patch: 1. 0001-Define-_POSIX_C_SOURCE-if-undefined.patch b) Added following patches to fix uclibc,musl and x32 build failures 1. 0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch 2. 0001-util.c-include-poll.h-instead-of-sys-poll.h.patch 3. 0001-Fix-some-type-comparison-problems.patch 4. 0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch (From OE-Core rev: e1ae012388e4321b95cd79c014af135cf6c419ad) 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/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch')
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch75
1 files changed, 35 insertions, 40 deletions
diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
index f7c55142f6..267c007c21 100644
--- a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
+++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
@@ -1,50 +1,45 @@
1From f3acf8499a4cc400206c5c56f0a6c69192ed55de Mon Sep 17 00:00:00 2001 1From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001
2From: Wenzong Fan <wenzong.fan@windriver.com> 2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Sat, 7 Nov 2015 04:21:17 -0500 3Date: Wed, 10 Feb 2016 17:28:05 +0200
4Subject: [PATCH] mdadm: fix ptest build errors 4Subject: [PATCH] mdadm-fix-ptest-build-errors
5 5
6Check return value for posix_memalign() to fix ptest build error: 6builds fail with ptest enabled:
7 7
8 raid6check.c:352:2: error: ignoring return value of posix_memalign, \ 8| restripe.c: In function 'test_stripes':
9 declared with attribute warn_unused_result [-Werror=unused-result] 9| restripe.c:845:4: error: ignoring return value of 'read', declared with
10 10| attribute warn_unused_result [-Werror=unused-result]
11Initialize *stripe_buf as NULL to fix ptest build error: 11| read(source[i], stripes[i], chunk_size);
12 12| ^
13 raid6check.c: In function 'check_stripes': 13| cc1: all warnings being treated as errors
14 raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \ 14| Makefile:214: recipe for target 'test_stripe' failed
15 in this function [-Werror=maybe-uninitialized]
16 15
17Upstream-Status: Pending 16Upstream-Status: Pending
18 17
19Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> 18Signed-off-by: Maxin B. John <maxin.john@intel.com>
20--- 19---
21 raid6check.c | 6 ++++-- 20 restripe.c | 6 +++++-
22 1 file changed, 4 insertions(+), 2 deletions(-) 21 1 file changed, 5 insertions(+), 1 deletion(-)
23 22
24diff --git a/raid6check.c b/raid6check.c 23diff --git a/restripe.c b/restripe.c
25index cb8522e..9462bcf 100644 24index 56dca73..d24b2b4 100644
26--- a/raid6check.c 25--- a/restripe.c
27+++ b/raid6check.c 26+++ b/restripe.c
28@@ -312,7 +312,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets, 27@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets,
29 /* read the data and p and q blocks, and check we got them right */
30 int data_disks = raid_disks - 2;
31 int syndrome_disks = data_disks + is_ddf(layout) * 2;
32- char *stripe_buf;
33+ char *stripe_buf = NULL;
34 28
35 /* stripes[] is indexed by raid_disk and holds chunks from each device */ 29 while (length > 0) {
36 char **stripes = xmalloc(raid_disks * sizeof(char*)); 30 int disk;
37@@ -349,7 +349,9 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets, 31+ ssize_t ret;
38 if (!tables_ready)
39 make_tables();
40 32
41- posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size); 33 for (i = 0 ; i < raid_disks ; i++) {
42+ if (posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size) != 0) 34 lseek64(source[i], offsets[i]+start, 0);
43+ goto exitCheck; 35- read(source[i], stripes[i], chunk_size);
44+ 36+ ret = read(source[i], stripes[i], chunk_size);
45 block_index_for_slot += 2; 37+ if (ret == -1) {
46 blocks += 2; 38+ printf("Read Failed\n");
47 blocks_page += 2; 39+ }
40 }
41 for (i = 0 ; i < data_disks ; i++) {
42 int disk = geo_map(i, start/chunk_size, raid_disks,
48-- 43--
491.9.1 442.4.0
50 45