grow command can't update chunksize
Resolves: RHEL-92288 Signed-off-by: Xiao Ni <xni@redhat.com>
This commit is contained in:
parent
e778d07c4c
commit
e6f7a8338e
53
mdadm-use-standard-libc-nftw.patch
Normal file
53
mdadm-use-standard-libc-nftw.patch
Normal file
@ -0,0 +1,53 @@
|
||||
commit e549ac6ab2ce5e7ec182310f8f5f2e41c6ac9233
|
||||
Author: Xiao Ni <xni@redhat.com>
|
||||
Date: Wed May 7 18:06:59 2025 +0800
|
||||
|
||||
mdadm: use standard libc nftw
|
||||
|
||||
commit bd648e3bec3d ("mdadm: Remove klibc and uclibc support") removes
|
||||
macro HAVE_NFTW/HAVE_FTW and uses libc header ftw.h. But it leaves the
|
||||
codes in lib.c which let mdadm command call nftw defined in lib.c. It
|
||||
needs to remove these codes.
|
||||
|
||||
The bug can be reproduced by:
|
||||
mdadm -CR /dev/md0 --level raid5 --metadata=1.1 --chunk=32 --raid-disks 3
|
||||
--size 10000 /dev/loop1 /dev/loop2 /dev/loop3
|
||||
mdadm /dev/md0 --grow --chunk=64
|
||||
mdadm: /dev/md0: cannot open component -unknown-
|
||||
|
||||
Fixes: bd648e3bec3d ("mdadm: Remove klibc and uclibc support")
|
||||
Signed-off-by: Xiao Ni <xni@redhat.com>
|
||||
|
||||
diff --git a/lib.c b/lib.c
|
||||
index f36ae03a..eb6cc119 100644
|
||||
--- a/lib.c
|
||||
+++ b/lib.c
|
||||
@@ -245,28 +245,6 @@ int add_dev(const char *name, const struct stat *stb, int flag, struct FTW *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#ifndef HAVE_NFTW
|
||||
-#ifdef HAVE_FTW
|
||||
-int add_dev_1(const char *name, const struct stat *stb, int flag)
|
||||
-{
|
||||
- return add_dev(name, stb, flag, NULL);
|
||||
-}
|
||||
-int nftw(const char *path,
|
||||
- int (*han)(const char *name, const struct stat *stb,
|
||||
- int flag, struct FTW *s), int nopenfd, int flags)
|
||||
-{
|
||||
- return ftw(path, add_dev_1, nopenfd);
|
||||
-}
|
||||
-#else
|
||||
-int nftw(const char *path,
|
||||
- int (*han)(const char *name, const struct stat *stb,
|
||||
- int flag, struct FTW *s), int nopenfd, int flags)
|
||||
-{
|
||||
- return 0;
|
||||
-}
|
||||
-#endif /* HAVE_FTW */
|
||||
-#endif /* HAVE_NFTW */
|
||||
-
|
||||
/*
|
||||
* Find a block device with the right major/minor number.
|
||||
* If we find multiple names, choose the shortest.
|
@ -3,7 +3,7 @@
|
||||
Name: mdadm
|
||||
Version: 4.4
|
||||
# extraversion is used to define rhel internal version
|
||||
%define extraversion 1
|
||||
%define extraversion 2
|
||||
Release: %{extraversion}%{?dist}
|
||||
Summary: The mdadm program controls Linux md devices (software RAID arrays)
|
||||
URL: https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
|
||||
@ -58,6 +58,7 @@ Patch033: 0034-Update-README.md.patch
|
||||
Patch034: 0035-mdadm-Remove-klibc-and-uclibc-support.patch
|
||||
Patch035: 0036-mdadm-include-asm-byteorder.h.patch
|
||||
Patch036: 0037-mdadm-use-kernel-raid-headers.patch
|
||||
Patch037: mdadm-use-standard-libc-nftw.patch
|
||||
|
||||
# Fedora customization patches
|
||||
Patch196: mdadm-fix-building-errors.patch
|
||||
@ -142,6 +143,10 @@ install -m644 %{SOURCE5} %{buildroot}/etc/libreport/events.d
|
||||
/usr/share/mdadm/mdcheck
|
||||
|
||||
%changelog
|
||||
* Mon May 19 2025 Xiao Ni <xni@redhat.com> - 4.4-2
|
||||
- grow command can't update chunksize
|
||||
- Resolves: RHEL-92288
|
||||
|
||||
* Wed Apr 30 2025 Xiao Ni <xni@redhat.com> - 4.4-1
|
||||
- Update to mdadm 4.4 and latest upstream
|
||||
- Resolves: RHEL-86676, RHEL-72803, RHEL-88793, RHEL-88791
|
||||
|
Loading…
Reference in New Issue
Block a user