diff options
Diffstat (limited to 'meta/recipes-extended/mdadm/files')
7 files changed, 0 insertions, 353 deletions
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 deleted file mode 100644 index 8598aea1f1..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | From 232101e2fcc6359fb6db2bc232570e373e368c75 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
| 3 | Date: Tue, 9 Feb 2016 11:44:01 +0200 | ||
| 4 | Subject: [PATCH] Fix the path of corosync and dlm header files check | ||
| 5 | |||
| 6 | Original Makefile will check headers on host instead of sysroot. | ||
| 7 | Fix it. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [Yocto specific] | ||
| 10 | |||
| 11 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
| 12 | --- | ||
| 13 | Makefile | 4 ++-- | ||
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/Makefile b/Makefile | ||
| 17 | index bcd092de..0a78cd22 100644 | ||
| 18 | --- a/Makefile | ||
| 19 | +++ b/Makefile | ||
| 20 | @@ -130,8 +130,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots | ||
| 21 | SYSTEMD_DIR=/lib/systemd/system | ||
| 22 | LIB_DIR=/usr/libexec/mdadm | ||
| 23 | |||
| 24 | -COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC) | ||
| 25 | -DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM) | ||
| 26 | +COROSYNC:=$(shell [ -f $(SYSROOT)/usr/include/corosync/cmap.h ] || echo -DNO_COROSYNC) | ||
| 27 | +DLM:=$(shell [ -f $(SYSROOT)/usr/include/libdlm.h ] || echo -DNO_DLM) | ||
| 28 | |||
| 29 | DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" | ||
| 30 | DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" | ||
diff --git a/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch b/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch deleted file mode 100644 index bb4e8d0604..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | From 407691e11037709af888ce2cf6bd5eac6971ac61 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
| 3 | Date: Tue, 25 Jan 2022 16:25:01 +0800 | ||
| 4 | Subject: [PATCH] Makefile: install mdcheck | ||
| 5 | |||
| 6 | The mdcheck_xxx.service files use mdcheck, but it's not installed. | ||
| 7 | We need to install this script. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [Sent patch to maintainer] | ||
| 10 | |||
| 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 12 | --- | ||
| 13 | Makefile | 1 + | ||
| 14 | 1 file changed, 1 insertion(+) | ||
| 15 | |||
| 16 | diff --git a/Makefile b/Makefile | ||
| 17 | index 981e16fa..b28e7855 100644 | ||
| 18 | --- a/Makefile | ||
| 19 | +++ b/Makefile | ||
| 20 | @@ -345,6 +345,7 @@ install-systemd: systemd/mdmon@.service | ||
| 21 | install-bin: mdadm mdmon | ||
| 22 | $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm | ||
| 23 | $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon | ||
| 24 | + $(INSTALL) -D -m 755 misc/mdcheck $(DESTDIR)/usr/share/mdadm/mdcheck | ||
| 25 | |||
| 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 | ||
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 deleted file mode 100644 index aa874dbec3..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch +++ /dev/null | |||
| @@ -1,155 +0,0 @@ | |||
| 1 | From 9e3b15adf86147fe581cd2159cb99708abe26158 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 10 Nov 2022 12:31:22 -0800 | ||
| 4 | Subject: [PATCH] restripe.c: Use _FILE_OFFSET_BITS to enable largefile support | ||
| 5 | |||
| 6 | Instead of using the lseek64 and friends, its better to enable it via | ||
| 7 | the feature macro _FILE_OFFSET_BITS = 64 and let the C library deal with | ||
| 8 | the width of types | ||
| 9 | |||
| 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> | ||
| 12 | --- | ||
| 13 | raid6check.c | 11 +++++++---- | ||
| 14 | restripe.c | 13 ++++++++----- | ||
| 15 | swap_super.c | 13 +++++++------ | ||
| 16 | 3 files changed, 22 insertions(+), 15 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/raid6check.c b/raid6check.c | ||
| 19 | index 99477761..8e7f1421 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 5e126eb7..af76c634 100644 | ||
| 64 | --- a/restripe.c | ||
| 65 | +++ b/restripe.c | ||
| 66 | @@ -22,6 +22,9 @@ | ||
| 67 | * Email: <neilb@suse.de> | ||
| 68 | */ | ||
| 69 | |||
| 70 | +/* Enable largefile support */ | ||
| 71 | +#define _FILE_OFFSET_BITS 64 | ||
| 72 | + | ||
| 73 | #include "mdadm.h" | ||
| 74 | #include "xmalloc.h" | ||
| 75 | |||
| 76 | @@ -583,7 +586,7 @@ int save_stripes(int *source, unsigned long long *offsets, | ||
| 77 | raid_disks, level, layout); | ||
| 78 | if (dnum < 0) abort(); | ||
| 79 | if (source[dnum] < 0 || | ||
| 80 | - lseek64(source[dnum], | ||
| 81 | + lseek(source[dnum], | ||
| 82 | offsets[dnum] + offset, 0) < 0 || | ||
| 83 | read(source[dnum], buf+disk * chunk_size, | ||
| 84 | chunk_size) != chunk_size) { | ||
| 85 | @@ -756,8 +759,8 @@ int restore_stripes(int *dest, unsigned long long *offsets, | ||
| 86 | raid_disks, level, layout); | ||
| 87 | if (src_buf == NULL) { | ||
| 88 | /* read from file */ | ||
| 89 | - if (lseek64(source, read_offset, 0) != | ||
| 90 | - (off64_t)read_offset) { | ||
| 91 | + if (lseek(source, read_offset, 0) != | ||
| 92 | + (off_t)read_offset) { | ||
| 93 | rv = -1; | ||
| 94 | goto abort; | ||
| 95 | } | ||
| 96 | @@ -818,7 +821,7 @@ int restore_stripes(int *dest, unsigned long long *offsets, | ||
| 97 | } | ||
| 98 | for (i=0; i < raid_disks ; i++) | ||
| 99 | if (dest[i] >= 0) { | ||
| 100 | - if (lseek64(dest[i], | ||
| 101 | + if (lseek(dest[i], | ||
| 102 | offsets[i]+offset, 0) < 0) { | ||
| 103 | rv = -1; | ||
| 104 | goto abort; | ||
| 105 | @@ -868,7 +871,7 @@ int test_stripes(int *source, unsigned long long *offsets, | ||
| 106 | int disk; | ||
| 107 | |||
| 108 | for (i = 0 ; i < raid_disks ; i++) { | ||
| 109 | - if ((lseek64(source[i], offsets[i]+start, 0) < 0) || | ||
| 110 | + if ((lseek(source[i], offsets[i]+start, 0) < 0) || | ||
| 111 | (read(source[i], stripes[i], chunk_size) != | ||
| 112 | chunk_size)) { | ||
| 113 | free(q); | ||
| 114 | diff --git a/swap_super.c b/swap_super.c | ||
| 115 | index b6db5743..18c89e2b 100644 | ||
| 116 | --- a/swap_super.c | ||
| 117 | +++ b/swap_super.c | ||
| 118 | @@ -1,3 +1,6 @@ | ||
| 119 | +/* Enable largefile support */ | ||
| 120 | +#define _FILE_OFFSET_BITS 64 | ||
| 121 | + | ||
| 122 | #include <unistd.h> | ||
| 123 | #include <stdlib.h> | ||
| 124 | #include <fcntl.h> | ||
| 125 | @@ -16,8 +19,6 @@ | ||
| 126 | |||
| 127 | #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) | ||
| 128 | |||
| 129 | -extern long long lseek64(int, long long, int); | ||
| 130 | - | ||
| 131 | int main(int argc, char *argv[]) | ||
| 132 | { | ||
| 133 | int fd, i; | ||
| 134 | @@ -38,8 +39,8 @@ int main(int argc, char *argv[]) | ||
| 135 | exit(1); | ||
| 136 | } | ||
| 137 | offset = MD_NEW_SIZE_SECTORS(size) * 512LL; | ||
| 138 | - if (lseek64(fd, offset, 0) < 0LL) { | ||
| 139 | - perror("lseek64"); | ||
| 140 | + if (lseek(fd, offset, 0) < 0LL) { | ||
| 141 | + perror("lseek"); | ||
| 142 | exit(1); | ||
| 143 | } | ||
| 144 | if (read(fd, super, 4096) != 4096) { | ||
| 145 | @@ -68,8 +69,8 @@ int main(int argc, char *argv[]) | ||
| 146 | super[32*4+10*4 +i] = t; | ||
| 147 | } | ||
| 148 | |||
| 149 | - if (lseek64(fd, offset, 0) < 0LL) { | ||
| 150 | - perror("lseek64"); | ||
| 151 | + if (lseek(fd, offset, 0) < 0LL) { | ||
| 152 | + perror("lseek"); | ||
| 153 | exit(1); | ||
| 154 | } | ||
| 155 | if (write(fd, super, 4096) != 4096) { | ||
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 deleted file mode 100644 index e425fc446e..0000000000 --- a/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | From 8de073c637a1ea968b7304f373a20b13a4a47bbc 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 fd6c9215..3210a03e 100644 | ||
| 18 | --- a/Create.c | ||
| 19 | +++ b/Create.c | ||
| 20 | @@ -33,6 +33,7 @@ | ||
| 21 | #include <signal.h> | ||
| 22 | #include <sys/signalfd.h> | ||
| 23 | #include <sys/wait.h> | ||
| 24 | +#include <linux/falloc.h> | ||
| 25 | |||
| 26 | #ifndef FALLOC_FL_ZERO_RANGE | ||
| 27 | #define FALLOC_FL_ZERO_RANGE 16 | ||
diff --git a/meta/recipes-extended/mdadm/files/mdadm.init b/meta/recipes-extended/mdadm/files/mdadm.init deleted file mode 100644 index cab91b9acc..0000000000 --- a/meta/recipes-extended/mdadm/files/mdadm.init +++ /dev/null | |||
| @@ -1,72 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # Start the MD monitor daemon for all active MD arrays if desired. | ||
| 4 | # | ||
| 5 | ### BEGIN INIT INFO | ||
| 6 | # Provides: mdadm | ||
| 7 | # Required-Start: $local_fs $syslog mdadm-raid | ||
| 8 | # Required-Stop: $local_fs $syslog mdadm-raid | ||
| 9 | # Default-Start: 2 3 4 5 | ||
| 10 | # Default-Stop: 0 1 6 | ||
| 11 | # Short-Description: MD monitoring daemon | ||
| 12 | # Description: mdadm provides a monitor mode, in which it will scan for | ||
| 13 | # problems with the MD devices. If a problem is found, the | ||
| 14 | # administrator is alerted via email, or a custom script is | ||
| 15 | # run. | ||
| 16 | ### END INIT INFO | ||
| 17 | # | ||
| 18 | |||
| 19 | MDADM=/sbin/mdadm | ||
| 20 | RUNDIR=/var/run/mdadm | ||
| 21 | PIDFILE=$RUNDIR/monitor.pid | ||
| 22 | DEBIANCONFIG=/etc/default/mdadm | ||
| 23 | |||
| 24 | test -x "$MDADM" || exit 0 | ||
| 25 | |||
| 26 | test -f /proc/mdstat || exit 0 | ||
| 27 | |||
| 28 | START_DAEMON=true | ||
| 29 | test -f $DEBIANCONFIG && . $DEBIANCONFIG | ||
| 30 | |||
| 31 | . /lib/lsb/init-functions | ||
| 32 | |||
| 33 | # Include functions | ||
| 34 | . /etc/init.d/functions | ||
| 35 | |||
| 36 | case "${1:-}" in | ||
| 37 | start) | ||
| 38 | if is_true $START_DAEMON; then | ||
| 39 | log_daemon_msg "Starting MD monitoring service" "mdadm --monitor" | ||
| 40 | mkdir -p $RUNDIR | ||
| 41 | start-stop-daemon -S -p $PIDFILE -x $MDADM -- \ | ||
| 42 | --monitor --pid-file $PIDFILE --daemonise --scan ${DAEMON_OPTIONS:-} | ||
| 43 | RETVAL=$? | ||
| 44 | log_end_msg $RETVAL | ||
| 45 | exit $RETVAL | ||
| 46 | fi | ||
| 47 | ;; | ||
| 48 | stop) | ||
| 49 | if [ -f $PIDFILE ] ; then | ||
| 50 | log_daemon_msg "Stopping MD monitoring service" "mdadm --monitor" | ||
| 51 | start-stop-daemon -K -p $PIDFILE -x $MDADM | ||
| 52 | RETVAL=$? | ||
| 53 | rm -f $PIDFILE | ||
| 54 | log_end_msg $RETVAL | ||
| 55 | exit $RETVAL | ||
| 56 | fi | ||
| 57 | ;; | ||
| 58 | status) | ||
| 59 | status -p $PIDFILE "$MDADM" && exit 0 || exit $? | ||
| 60 | ;; | ||
| 61 | restart|reload|force-reload) | ||
| 62 | ${0:-} stop | ||
| 63 | ${0:-} start | ||
| 64 | ;; | ||
| 65 | *) | ||
| 66 | echo "Usage: ${0:-} {start|stop|status|restart|reload|force-reload}" >&2 | ||
| 67 | exit 1 | ||
| 68 | ;; | ||
| 69 | esac | ||
| 70 | |||
| 71 | exit 0 | ||
| 72 | |||
diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest deleted file mode 100644 index c3f201491e..0000000000 --- a/meta/recipes-extended/mdadm/files/run-ptest +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | logdir=$PWD/logs | ||
| 4 | targetdir=/mdadm-testing-dir | ||
| 5 | |||
| 6 | rm -rf $targetdir $logdir | ||
| 7 | mkdir -p $targetdir $logdir | ||
| 8 | |||
| 9 | # make the test continue to execute even one fail | ||
| 10 | ./test --keep-going --disable-integrity --skip-broken --save-logs --logdir=$logdir | ||
diff --git a/meta/recipes-extended/mdadm/files/xmalloc.patch b/meta/recipes-extended/mdadm/files/xmalloc.patch deleted file mode 100644 index 61774721d0..0000000000 --- a/meta/recipes-extended/mdadm/files/xmalloc.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From c5cf5a83be4e3ce04ebf3250f77aeb465eeb53a1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Xiao Ni <xni@redhat.com> | ||
| 3 | Date: Fri, 17 Jan 2025 15:15:40 +0800 | ||
| 4 | Subject: [PATCH] mdadm/raid6check: add xmalloc.h to raid6check.c | ||
| 5 | |||
| 6 | It reports building error: | ||
| 7 | raid6check.c:324:26: error: implicit declaration of function xmalloc | ||
| 8 | |||
| 9 | Add xmalloc.h to raid6check.c file to fix this. | ||
| 10 | |||
| 11 | Signed-off-by: Xiao Ni <xni@redhat.com> | ||
| 12 | Link: https://lore.kernel.org/r/20250117071540.4094-1-xni@redhat.com | ||
| 13 | Signed-off-by: Song Liu <song@kernel.org> | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?h=main&id=e0df6c4c984d564e9e40913727e916a6cd8f466e] | ||
| 16 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 17 | --- | ||
| 18 | raid6check.c | 1 + | ||
| 19 | 1 file changed, 1 insertion(+) | ||
| 20 | |||
| 21 | diff --git a/raid6check.c b/raid6check.c | ||
| 22 | index 8e7f1421..486b10c6 100644 | ||
| 23 | --- a/raid6check.c | ||
| 24 | +++ b/raid6check.c | ||
| 25 | @@ -26,6 +26,7 @@ | ||
| 26 | #define _FILE_OFFSET_BITS 64 | ||
| 27 | |||
| 28 | #include "mdadm.h" | ||
| 29 | +#include "xmalloc.h" | ||
| 30 | #include <stdint.h> | ||
| 31 | #include <sys/mman.h> | ||
| 32 | |||
