From 2e3a9479549fc2de01b9d5cb7f86941adc403c00 Mon Sep 17 00:00:00 2001 From: Xiao Ni Date: Sat, 10 Aug 2024 21:06:25 -0400 Subject: [PATCH] /dev/md symlink not created for second RAID container Resolves: RHEL-50456 Signed-off-by: Xiao Ni --- ...tail-fix-detail-export-for-uuid_zero.patch | 36 +++++++++++++++++++ mdadm.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0070-Detail-fix-detail-export-for-uuid_zero.patch diff --git a/0070-Detail-fix-detail-export-for-uuid_zero.patch b/0070-Detail-fix-detail-export-for-uuid_zero.patch new file mode 100644 index 0000000..f9499cd --- /dev/null +++ b/0070-Detail-fix-detail-export-for-uuid_zero.patch @@ -0,0 +1,36 @@ +From 5be749ce416852e7acbb2415be380be358859612 Mon Sep 17 00:00:00 2001 +From: Kinga Stefaniuk +Date: Tue, 23 Jul 2024 15:38:41 +0200 +Subject: [PATCH 1/1] Detail: fix --detail --export for uuid_zero + +Mentioned commit (see Fixes) causes that devices with UUID +equal to uuid_zero was not recognized properly. For few devices +the first one was taken always, and the same information was +printed. It caused regression, when few containers were created, +symlinks were generated only for the first one. + +Add checking if uuid is uuid_zero and, if yes, use devname to +differentiate devices. + +Fixes: 60c19530dd7c ("Detail: remove duplicated code") +Signed-off-by: Kinga Stefaniuk +--- + Detail.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Detail.c b/Detail.c +index 55a086d3..f8b9e847 100644 +--- a/Detail.c ++++ b/Detail.c +@@ -274,7 +274,7 @@ int Detail(char *dev, struct context *c) + array.minor_version); + } + +- if (info) ++ if (info && memcmp(info->uuid, uuid_zero, sizeof(int[4])) != 0) + mp = map_by_uuid(&map, info->uuid); + if (!mp) + mp = map_by_devnm(&map, fd2devnm(fd)); +-- +2.41.0 + diff --git a/mdadm.spec b/mdadm.spec index e706d71..6425f2f 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ Name: mdadm Version: 4.3 # extraversion is used to define rhel internal version -%define extraversion 2 +%define extraversion 3 Release: %{extraversion}%{?dist} Summary: The mdadm program controls Linux md devices (software RAID arrays) URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ @@ -86,6 +86,7 @@ Patch063: 0064-tests-23rdev-lifetime-fix-a-typo.patch Patch064: 0065-util.c-change-devnm-to-const-in-mdmon-functions.patch Patch065: 0066-Wait-for-mdmon-when-it-is-stared-via-systemd.patch Patch066: 0069-mdadm-Fix-compilation-for-32-bit-arch.patch +Patch067: 0070-Detail-fix-detail-export-for-uuid_zero.patch # Fedora customization patches @@ -164,6 +165,10 @@ install -m644 %{SOURCE5} %{buildroot}/etc/libreport/events.d /usr/share/mdadm/mdcheck %changelog +* Sun Aug 11 2024 Xiao Ni 4.3-3 +- /dev/md symlink not created for second RAID container +- Resolves RHEL-50456 + * Thu May 16 2024 Xiao Ni 4.3-2 - Update to latest upstream - Resolves RHEL-36424