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/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch | |
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/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch')
-rw-r--r-- | meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch | 106 |
1 files changed, 57 insertions, 49 deletions
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 @@ |