From 6520b3bd9f52b46501c6546681a9574f5d60112e Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Aug 05 2014 09:48:09 +0000 Subject: Apply proper fix for bz1125883 Resolves bz1125883 Signed-off-by: Jes Sorensen --- diff --git a/mdadm-3.3.1-DDF-cast-print-arguments-in-super-ddf.c.patch b/mdadm-3.3.1-DDF-cast-print-arguments-in-super-ddf.c.patch new file mode 100644 index 0000000..9f68beb --- /dev/null +++ b/mdadm-3.3.1-DDF-cast-print-arguments-in-super-ddf.c.patch @@ -0,0 +1,51 @@ +From d13566f9b6ff8377f45cd025a1cd1a58bcb4e857 Mon Sep 17 00:00:00 2001 +From: Guy Menanteau +Date: Mon, 4 Aug 2014 16:53:03 +0200 +Subject: [PATCH] DDF: cast print arguments in super-ddf.c + +mdadm fails to build on ppc64 and ppc64le architectures. +=== +super-ddf.c: In function '_set_config_size': +super-ddf.c:2849:4: error: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type '__u64' [-Werror=format=] + pr_err("%s: %x:%x: workspace size 0x%llx too big, ignoring\n", + ^ +super-ddf.c:2855:2: error: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type '__u64' [-Werror=format=] + dprintf("%s: %x:%x config_size %llx, DDF structure is %llx blocks\n", + ^ +cc1: all warnings being treated as errors +: recipe for target 'super-ddf.o' failed +=== + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1125883 +Signed-off-by: +Signed-off-by: Michel Normand +Signed-off-by: NeilBrown +--- + super-ddf.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/super-ddf.c b/super-ddf.c +index 8957c2e..bc0ce2c 100644 +--- a/super-ddf.c ++++ b/super-ddf.c +@@ -2847,13 +2847,15 @@ static void _set_config_size(struct phys_disk_entry *pde, const struct dl *dl) + __u64 wsp = cfs - t; + if (wsp > 1024*1024*2ULL && wsp > dl->size / 16) { + pr_err("%s: %x:%x: workspace size 0x%llx too big, ignoring\n", +- __func__, dl->major, dl->minor, wsp); ++ __func__, dl->major, dl->minor, ++ (unsigned long long)wsp); + } else + cfs = t; + } + pde->config_size = cpu_to_be64(cfs); + dprintf("%s: %x:%x config_size %llx, DDF structure is %llx blocks\n", +- __func__, dl->major, dl->minor, cfs, dl->size-cfs); ++ __func__, dl->major, dl->minor, ++ (unsigned long long)cfs, (unsigned long long)(dl->size-cfs)); + } + + /* Add a device to a container, either while creating it or while +-- +1.9.3 + diff --git a/mdadm-3.3.1-format-argument.patch b/mdadm-3.3.1-format-argument.patch deleted file mode 100644 index 63fc3d3..0000000 --- a/mdadm-3.3.1-format-argument.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- mdadm-3.3.1/super-ddf.c.ori -+++ mdadm-3.3.1/super-ddf.c -@@ -2847,13 +2847,15 @@ static void _set_config_size(struct phys - __u64 wsp = cfs - t; - if (wsp > 1024*1024*2ULL && wsp > dl->size / 16) { - pr_err("%s: %x:%x: workspace size 0x%llx too big, ignoring\n", -- __func__, dl->major, dl->minor, wsp); -+ __func__, dl->major, dl->minor, -+ (unsigned long long)wsp); - } else - cfs = t; - } - pde->config_size = cpu_to_be64(cfs); - dprintf("%s: %x:%x config_size %llx, DDF structure is %llx blocks\n", -- __func__, dl->major, dl->minor, cfs, dl->size-cfs); -+ __func__, dl->major, dl->minor, -+ (unsigned long long)cfs, (unsigned long long)(dl->size-cfs)); - } - - /* Add a device to a container, either while creating it or while diff --git a/mdadm.spec b/mdadm.spec index 1334038..787db30 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ Summary: The mdadm program controls Linux md devices (software RAID arrays) Name: mdadm Version: 3.3.1 -Release: 5%{?dist} +Release: 6%{?dist} Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz Source1: mdmonitor.init Source2: raid-check @@ -14,6 +14,7 @@ Source8: mdadm_event.conf Patch1: mdadm-3.3.1-Grow-improve-error-message-is-grow-n2-used-on-Linear.patch Patch2: mdadm-3.3.1-Assemble-Only-fail-auto-assemble-in-face-of-mdadm.co.patch +Patch3: mdadm-3.3.1-DDF-cast-print-arguments-in-super-ddf.c.patch # Fedora customization patches Patch97: mdadm-3.3-udev.patch Patch98: mdadm-2.5.2-static.patch @@ -42,6 +43,7 @@ file can be used to help with some common tasks. %patch1 -p1 -b .lineargrow %patch2 -p1 -b .autofail +%patch3 -p1 -b .ddf # Fedora customization patches %patch97 -p1 -b .udev %patch98 -p1 -b .static @@ -106,6 +108,10 @@ rm -rf %{buildroot} /etc/libreport/events.d/* %changelog +* Tue Aug 5 2014 Jes Sorensen - 3.3.1-6 +- Apply proper fix for bz1125883, clean up after rogue patch application +- Resolves bz1125883 + * Mon Aug 04 2014 Dan HorĂ¡k - 3.3.1-5 - revert the previous fix, not upstream yet