@@ -1,4 +1,4 @@
-From 232101e2fcc6359fb6db2bc232570e373e368c75 Mon Sep 17 00:00:00 2001
+From 77e9527a0ea995ed377e00813eeeb17175dbce72 Mon Sep 17 00:00:00 2001
From: "Maxin B. John" <maxin.john@intel.com>
Date: Tue, 9 Feb 2016 11:44:01 +0200
Subject: [PATCH] Fix the path of corosync and dlm header files check
@@ -14,10 +14,10 @@ Signed-off-by: Maxin B. John <maxin.john@intel.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
-index bcd092de..0a78cd22 100644
+index 8031ce24..788ff5d9 100644
--- a/Makefile
+++ b/Makefile
-@@ -130,8 +130,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
+@@ -120,8 +120,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
SYSTEMD_DIR=/lib/systemd/system
LIB_DIR=/usr/libexec/mdadm
@@ -1,4 +1,4 @@
-From 407691e11037709af888ce2cf6bd5eac6971ac61 Mon Sep 17 00:00:00 2001
+From ed0163039de3e22ee6501162616649b6ec0e0366 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 25 Jan 2022 16:25:01 +0800
Subject: [PATCH] Makefile: install mdcheck
@@ -14,14 +14,14 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
-index 981e16fa..b28e7855 100644
+index 788ff5d9..2201a6e3 100644
--- a/Makefile
+++ b/Makefile
-@@ -345,6 +345,7 @@ install-systemd: systemd/mdmon@.service
+@@ -327,6 +327,7 @@ install-systemd: systemd/mdmon@.service
install-bin: mdadm mdmon
$(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm
$(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon
+ $(INSTALL) -D -m 755 misc/mdcheck $(DESTDIR)/usr/share/mdadm/mdcheck
uninstall:
- rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm
+ rm -f $(DESTDIR)$(BINDIR)/mdadm $(DESTDIR)$(BINDIR)/mdmon
new file mode 100644
@@ -0,0 +1,54 @@
+From 0d685f4ec8b54860a031fe3e04a2fff535288f80 Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <ankur.tyagi85@gmail.com>
+Date: Mon, 26 Jan 2026 22:46:51 +1300
+Subject: [PATCH] raid6check.c, restripe.c: Use 64-bit off_t across both musl
+ and glibc
+
+This commit is adaptation of original patch[1] after commit[2] addressed
+lseek issues.
+
+[1] https://lore.kernel.org/linux-raid/20221110225546.337164-1-raj.khem@gmail.com/
+[2] https://github.com/md-raid-utilities/mdadm/commit/787cc1b60130b8031be59e49d54463c58cd8cf74
+
+Upstream-Status: Submitted [https://github.com/md-raid-utilities/mdadm/pull/235]
+Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
+---
+ raid6check.c | 4 ++--
+ restripe.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/raid6check.c b/raid6check.c
+index 4469dc8f..fa50d44e 100644
+--- a/raid6check.c
++++ b/raid6check.c
+@@ -288,7 +288,7 @@ int manual_repair(int chunk_size, int syndrome_disks,
+ }
+
+ int write_res1, write_res2;
+- off64_t seek_res;
++ off_t seek_res;
+
+ seek_res = lseek(source[fd1], offsets[fd1] + start * chunk_size, SEEK_SET);
+ if (seek_res < 0) {
+@@ -381,7 +381,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
+ goto exitCheck;
+ }
+ for (i = 0 ; i < raid_disks ; i++) {
+- off64_t seek_res = lseek(source[i], offsets[i] + start * chunk_size,
++ off_t seek_res = lseek(source[i], offsets[i] + start * chunk_size,
+ SEEK_SET);
+ if (seek_res < 0) {
+ fprintf(stderr, "lseek to source %d failed\n", i);
+diff --git a/restripe.c b/restripe.c
+index ec8d6275..58c0f5f5 100644
+--- a/restripe.c
++++ b/restripe.c
+@@ -756,7 +756,7 @@ int restore_stripes(int *dest, unsigned long long *offsets,
+ if (src_buf == NULL) {
+ /* read from file */
+ if (lseek(source, read_offset, 0) !=
+- (off64_t)read_offset) {
++ (off_t)read_offset) {
+ rv = -1;
+ goto abort;
+ }
@@ -1,4 +1,4 @@
-From 8de073c637a1ea968b7304f373a20b13a4a47bbc Mon Sep 17 00:00:00 2001
+From b7e51fbedc1fbc44af00398a4a7aef51cdf191ee Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Tue, 12 Mar 2024 10:54:08 +0100
Subject: [PATCH] Create.c: include linux/falloc.h for FALLOC_FL_ZERO_RANGE
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de>
1 file changed, 1 insertion(+)
diff --git a/Create.c b/Create.c
-index fd6c9215..3210a03e 100644
+index 4aa75b7e..5d5fc806 100644
--- a/Create.c
+++ b/Create.c
-@@ -33,6 +33,7 @@
+@@ -31,6 +31,7 @@
#include <signal.h>
#include <sys/signalfd.h>
#include <sys/wait.h>
similarity index 96%
rename from meta/recipes-extended/mdadm/mdadm_4.4.bb
rename to meta/recipes-extended/mdadm/mdadm_4.5.bb
@@ -13,12 +13,11 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;bra
file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
file://mdadm.init \
file://0001-Makefile-install-mdcheck.patch \
- file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \
file://0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch \
- file://xmalloc.patch \
+ file://0001-raid6check.c-restripe.c-Use-64-bit-off_t-across-both.patch \
"
-SRCREV = "8e56efac9afd7080bb42bae4b77cdad5f345633a"
+SRCREV = "8f0c7692d48414ff7b3fe927ce75799c65ef24b1"
inherit ptest systemd