[mdadm] Fix build on PPC. Resolves: bz719379

Milan Broz mbroz at fedoraproject.org
Wed Jul 6 19:28:11 UTC 2011


commit b979607a1c9ebfa7d726d00dfbe1d56b3fe78881
Author: Milan Broz <mbroz at redhat.com>
Date:   Wed Jul 6 15:27:18 2011 -0400

    Fix build on PPC.
    Resolves: bz719379

 mdadm-3.2.2-fixbuild.patch |   26 ++++++++++++++++++++++++++
 mdadm.spec                 |    8 +++++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/mdadm-3.2.2-fixbuild.patch b/mdadm-3.2.2-fixbuild.patch
new file mode 100644
index 0000000..9ba872c
--- /dev/null
+++ b/mdadm-3.2.2-fixbuild.patch
@@ -0,0 +1,26 @@
+--- a/super-intel.c
++++ b/super-intel.c
+@@ -2326,7 +2326,9 @@ static void getinfo_super_imsm_volume(st
+ 
+ 			dprintf("IMSM: General Migration checkpoint : %llu "
+ 			       "(%llu) -> read reshape progress : %llu\n",
+-				units, blocks_per_unit, info->reshape_progress);
++				(unsigned long long)units,
++				(unsigned long long)blocks_per_unit,
++				info->reshape_progress);
+ 
+ 			used_disks = imsm_num_data_members(dev, 1);
+ 			if (used_disks > 0) {
+@@ -8661,7 +8663,11 @@ static int imsm_reshape_super(struct sup
+ 		dprintf("imsm: info: Volume operation\n");
+ 		/* find requested device */
+ 		while (dev) {
+-			imsm_find_array_minor_by_subdev(dev->index, st->container_dev, &devnum);
++			if (imsm_find_array_minor_by_subdev(dev->index,
++			    st->container_dev, &devnum) < 0) {
++				dprintf("imsm: cannot find array\n");
++				goto exit_imsm_reshape_super;
++			}
+ 			if (devnum == geo.dev_id)
+ 				break;
+ 			dev = dev->next;
diff --git a/mdadm.spec b/mdadm.spec
index 64f5e7a..2bbcfc0 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.2.2
-Release:     1%{?dist}
+Release:     2%{?dist}
 Source:      http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
 Source1:     mdmonitor.init
 Source2:     raid-check
@@ -10,6 +10,7 @@ Source4:     mdadm-raid-check-sysconfig
 Source5:     mdadm-cron
 Patch0:      mdadm-3.2.2-man.patch
 Patch1:      mdadm-3.2.1-version.patch
+Patch2:      mdadm-3.2.2-fixbuild.patch
 Patch19:     mdadm-3.1.3-udev.patch
 Patch20:     mdadm-2.5.2-static.patch
 URL:         http://www.kernel.org/pub/linux/utils/raid/mdadm/
@@ -33,6 +34,7 @@ file can be used to help with some common tasks.
 %setup -q
 %patch0 -p1 -b .man
 %patch1 -p1 -b .version
+%patch2 -p1 -b .build
 %patch19 -p1 -b .udev
 %patch20 -p1 -b .static
 
@@ -81,6 +83,10 @@ fi
 %ghost %attr(0700,root,root) %dir /var/run/mdadm
 
 %changelog
+* Wed Jul 06 2011 Milan Broz <mbroz at redhat.com> - 3.2.2-2
+- Fix build on PPC.
+- Resolves: bz719380
+
 * Tue Jun 28 2011 Milan Broz <mbroz at redhat.com> - 3.2.2-1
 - Update to latest upstream version
 - Resolves: bz714083


More information about the scm-commits mailing list