rpms/mdadm/F-13 mdadm-3.1.1-endian.patch, NONE, 1.1 mdadm-3.1.1-warn.patch, NONE, 1.1 .cvsignore, 1.27, 1.28 mdadm-2.5.2-static.patch, 1.5, 1.6 mdadm.spec, 1.79, 1.80 sources, 1.27, 1.28 mdadm-3.0-mdmon-dev-.mdadm.patch, 1.2, NONE mdadm-3.0-metadata.patch, 1.1, NONE mdadm-3.0-uuid.patch, 1.1, NONE mdadm-3.0.3-auto.patch, 1.1, NONE mdadm-3.0.3-intel-serial.patch, 1.1, NONE

Doug Ledford dledford at fedoraproject.org
Thu Feb 18 18:02:36 UTC 2010


Author: dledford

Update of /cvs/extras/rpms/mdadm/F-13
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9548

Modified Files:
	.cvsignore mdadm-2.5.2-static.patch mdadm.spec sources 
Added Files:
	mdadm-3.1.1-endian.patch mdadm-3.1.1-warn.patch 
Removed Files:
	mdadm-3.0-mdmon-dev-.mdadm.patch mdadm-3.0-metadata.patch 
	mdadm-3.0-uuid.patch mdadm-3.0.3-auto.patch 
	mdadm-3.0.3-intel-serial.patch 
Log Message:
* Thu Feb 18 2010 Doug Ledford <dledford at redhat.com> - 3.1.1-0.gcd9a8b5.2
- Fix s390/ppc64 UUID byte swap issue


mdadm-3.1.1-endian.patch:
 super1.c |    4 ----
 1 file changed, 4 deletions(-)

--- NEW FILE mdadm-3.1.1-endian.patch ---
--- mdadm-3.1.1/super1.c.endian	2010-02-18 01:39:56.079803165 -0500
+++ mdadm-3.1.1/super1.c	2010-02-18 01:40:07.973803550 -0500
@@ -1667,10 +1667,6 @@ struct superswitch super1 = {
 	.locate_bitmap = locate_bitmap1,
 	.write_bitmap = write_bitmap1,
 	.free_super = free_super1,
-#if __BYTE_ORDER == BIG_ENDIAN
-	.swapuuid = 0,
-#else
 	.swapuuid = 1,
-#endif
 	.name = "1.x",
 };

mdadm-3.1.1-warn.patch:
 Grow.c        |   34 +++++++++++++++++++++++-----------
 mdmon.c       |    2 +-
 restripe.c    |    5 ++++-
 super-intel.c |    2 +-
 4 files changed, 29 insertions(+), 14 deletions(-)

--- NEW FILE mdadm-3.1.1-warn.patch ---
--- mdadm-3.1.1/Grow.c.warn	2010-02-08 01:26:18.000000000 -0500
+++ mdadm-3.1.1/Grow.c	2010-02-17 14:58:43.615427833 -0500
@@ -1096,7 +1096,7 @@ int Grow_reshape(char *devname, int fd, 
 			/* set them all just in case some old 'new_*' value
 			 * persists from some earlier problem
 			 */
-			int err;
+			int err = 0;
 			if (sysfs_set_num(sra, NULL, "chunk_size", nchunk) < 0)
 				rv = 1, err = errno;
 			if (!rv && sysfs_set_num(sra, NULL, "layout", nlayout) < 0)
@@ -1269,6 +1269,7 @@ int grow_backup(struct mdinfo *sra,
 	int odata = disks;
 	int rv = 0;
 	int i;
+	int ret;
 	unsigned long long new_degraded;
 	//printf("offset %llu\n", offset);
 	if (level >= 4)
@@ -1334,10 +1335,10 @@ int grow_backup(struct mdinfo *sra,
 						((char*)&bsb.sb_csum2)-((char*)&bsb));
 
 		lseek64(destfd[i], destoffsets[i] - 4096, 0);
-		write(destfd[i], &bsb, 512);
+		ret = write(destfd[i], &bsb, 512);
 		if (destoffsets[i] > 4096) {
 			lseek64(destfd[i], destoffsets[i]+stripes*chunk*odata, 0);
-			write(destfd[i], &bsb, 512);
+			ret = write(destfd[i], &bsb, 512);
 		}
 		fsync(destfd[i]);
 	}
@@ -1368,6 +1369,7 @@ int wait_backup(struct mdinfo *sra,
 	int fd = sysfs_get_fd(sra, NULL, "sync_completed");
 	unsigned long long completed;
 	int i;
+	int ret;
 
 	if (fd < 0)
 		return -1;
@@ -1406,7 +1408,7 @@ int wait_backup(struct mdinfo *sra,
 			bsb.sb_csum2 = bsb_csum((char*)&bsb,
 						((char*)&bsb.sb_csum2)-((char*)&bsb));
 		lseek64(destfd[i], destoffsets[i]-4096, 0);
-		write(destfd[i], &bsb, 512);
+		ret = write(destfd[i], &bsb, 512);
 		fsync(destfd[i]);
 	}
 	return 0;
@@ -1414,8 +1416,9 @@ int wait_backup(struct mdinfo *sra,
 
 static void fail(char *msg)
 {
-	write(2, msg, strlen(msg));
-	write(2, "\n", 1);
+	int ret;
+	ret = write(2, msg, strlen(msg));
+	ret = write(2, "\n", 1);
 	exit(1);
 }
 
@@ -1452,8 +1455,10 @@ static void validate(int afd, int bfd, u
 			free(abuf);
 			free(bbuf);
 			abuflen = len;
-			posix_memalign((void**)&abuf, 4096, abuflen);
-			posix_memalign((void**)&bbuf, 4096, abuflen);
+			if (posix_memalign((void**)&abuf, 4096, abuflen) != 0)
+				fail("unable to allocate aligned memory");
+			if (posix_memalign((void**)&bbuf, 4096, abuflen) != 0)
+				fail("unable to allocate aligned memory");
 		}
 
 		lseek64(bfd, offset, 0);
@@ -1486,7 +1491,11 @@ static void validate(int afd, int bfd, u
 			free(bbuf);
 			abuflen = len;
 			abuf = malloc(abuflen);
+			if (abuf == NULL)
+				fail("unable to allocate memory");
 			bbuf = malloc(abuflen);
+			if (bbuf == NULL)
+				fail("unable to allocate memory");
 		}
 
 		lseek64(bfd, offset+__le64_to_cpu(bsb2.devstart2)*512, 0);
@@ -1508,7 +1517,8 @@ static int child_grow(int afd, struct md
 	char *buf;
 	int degraded = 0;
 
-	posix_memalign((void**)&buf, 4096, disks * chunk);
+	if (posix_memalign((void**)&buf, 4096, disks * chunk) != 0)
+		fail("unable to allocate aligned memory");
 	sysfs_set_num(sra, NULL, "suspend_hi", 0);
 	sysfs_set_num(sra, NULL, "suspend_lo", 0);
 	grow_backup(sra, 0, stripes,
@@ -1536,7 +1546,8 @@ static int child_shrink(int afd, struct 
 	int rv;
 	int degraded = 0;
 
-	posix_memalign((void**)&buf, 4096, disks * chunk);
+	if (posix_memalign((void**)&buf, 4096, disks * chunk) != 0)
+		fail("unable to allocate alinged memory");
 	start = sra->component_size - stripes * chunk/512;
 	sysfs_set_num(sra, NULL, "sync_max", start);
 	sysfs_set_str(sra, NULL, "sync_action", "reshape");
@@ -1575,7 +1586,8 @@ static int child_same_size(int afd, stru
 	int degraded = 0;
 
 
-	posix_memalign((void**)&buf, 4096, disks * chunk);
+	if (posix_memalign((void**)&buf, 4096, disks * chunk) != 0)
+		fail("unable to allocate alinged memory");
 
 	sysfs_set_num(sra, NULL, "suspend_lo", 0);
 	sysfs_set_num(sra, NULL, "suspend_hi", 0);
--- mdadm-3.1.1/restripe.c.warn	2010-02-08 01:26:18.000000000 -0500
+++ mdadm-3.1.1/restripe.c	2010-02-17 14:58:43.615427833 -0500
@@ -565,7 +565,10 @@ int restore_stripes(int *dest, unsigned 
 
 	int data_disks = raid_disks - (level == 0 ? 0 : level <= 5 ? 1 : 2);
 
-	posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size);
+	if (posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size) != 0) {
+		fprintf(stderr, "unable to allocate aligned memory\n");
+		exit(1);
+	}
 	if (zero == NULL) {
 		zero = malloc(chunk_size);
 		if (zero)
--- mdadm-3.1.1/mdmon.c.warn	2010-02-08 01:26:18.000000000 -0500
+++ mdadm-3.1.1/mdmon.c	2010-02-17 14:58:43.616427642 -0500
@@ -176,7 +176,7 @@ static void try_kill_monitor(pid_t pid, 
 	fl = fcntl(sock, F_GETFL, 0);
 	fl &= ~O_NONBLOCK;
 	fcntl(sock, F_SETFL, fl);
-	read(sock, buf, 100);
+	n = read(sock, buf, 100);
 }
 
 void remove_pidfile(char *devname)
--- mdadm-3.1.1/super-intel.c.warn	2010-02-17 14:59:16.757425375 -0500
+++ mdadm-3.1.1/super-intel.c	2010-02-17 15:00:15.309803578 -0500
@@ -698,7 +698,7 @@ static void print_imsm_dev(struct imsm_d
 		printf(" <-- %s", map_state_str[map->map_state]);
 		printf("\n     Checkpoint : %u (%llu)",
 		       __le32_to_cpu(dev->vol.curr_migr_unit),
-		       blocks_per_migr_unit(dev));
+		       (unsigned long long)blocks_per_migr_unit(dev));
 	}
 	printf("\n");
 	printf("    Dirty State : %s\n", dev->vol.dirty ? "dirty" : "clean");


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/mdadm/F-13/.cvsignore,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -r1.27 -r1.28
--- .cvsignore	5 Nov 2009 21:30:16 -0000	1.27
+++ .cvsignore	18 Feb 2010 18:02:35 -0000	1.28
@@ -1 +1,2 @@
 mdadm-3.0.3.tar.bz2
+mdadm-3.1.1-gcd9a8b5.tar.bz2

mdadm-2.5.2-static.patch:
 Makefile |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: mdadm-2.5.2-static.patch
===================================================================
RCS file: /cvs/extras/rpms/mdadm/F-13/mdadm-2.5.2-static.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- mdadm-2.5.2-static.patch	29 Jun 2009 19:18:19 -0000	1.5
+++ mdadm-2.5.2-static.patch	18 Feb 2010 18:02:36 -0000	1.6
@@ -1,7 +1,15 @@
-Binary files mdadm-3.0-devel2/mdadm.static and mdadm-3.0-devel2/mdadm differ
---- mdadm-3.0-devel2/Makefile.static	2009-02-12 09:58:36.000000000 -0500
-+++ mdadm-3.0-devel2/Makefile	2009-02-12 09:59:22.000000000 -0500
-@@ -183,16 +183,16 @@ sha1.o : sha1.c sha1.h md5.h
+--- mdadm-3.1.1/Makefile.static	2010-02-08 01:26:18.000000000 -0500
++++ mdadm-3.1.1/Makefile	2010-02-17 13:52:42.928428188 -0500
+@@ -62,7 +62,7 @@ CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)
+ # from early boot to late boot.
+ # If you don't have /lib/init/rw you might want to use /dev/.something
+ #  e.g. make ALT_RUN=/dev/.mdadm
+-ALT_RUN = /lib/init/rw
++ALT_RUN = /dev/md
+ ALTFLAGS = -DALT_RUN=\"$(ALT_RUN)\"
+ CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(ALTFLAGS)
+ 
+@@ -196,16 +196,16 @@ install : mdadm mdmon install-man instal
  	$(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon
  
  install-static : mdadm.static install-man


Index: mdadm.spec
===================================================================
RCS file: /cvs/extras/rpms/mdadm/F-13/mdadm.spec,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -p -r1.79 -r1.80
--- mdadm.spec	15 Jan 2010 21:35:06 -0000	1.79
+++ mdadm.spec	18 Feb 2010 18:02:36 -0000	1.80
@@ -1,18 +1,15 @@
 Summary:     The mdadm program controls Linux md devices (software RAID arrays)
 Name:        mdadm
-Version:     3.0.3
-Release:     3%{?dist}
-Source:      http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
+Version:     3.1.1
+Release:     0.gcd9a8b5.2%{?dist}
+Source:      http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-gcd9a8b5.tar.bz2
 Source1:     mdmonitor.init
 Source2:     raid-check
 Source3:     mdadm.rules
 Source4:     mdadm-raid-check-sysconfig
 Patch1:      mdadm-2.5.2-static.patch
-Patch2:      mdadm-3.0-metadata.patch
-Patch3:      mdadm-3.0-uuid.patch
-Patch4:      mdadm-3.0-mdmon-dev-.mdadm.patch
-Patch5:      mdadm-3.0.3-intel-serial.patch
-Patch6:      mdadm-3.0.3-auto.patch
+Patch2:      mdadm-3.1.1-warn.patch
+Patch3:      mdadm-3.1.1-endian.patch
 URL:         http://www.kernel.org/pub/linux/utils/raid/mdadm/
 License:     GPLv2+
 Group:       System Environment/Base
@@ -34,11 +31,8 @@ file can be used to help with some commo
 %prep
 %setup -q
 %patch1 -p1 -b .static
-%patch2 -p1 -b .metadata
-%patch3 -p1 -b .uuid
-%patch4 -p1 -b .mdmon
-%patch5 -p1 -b .serial
-%patch6 -p1 -b .auto
+%patch2 -p1 -b .warn
+%patch3 -p1 -b .endian
 
 %build
 make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" SYSCONFDIR="%{_sysconfdir}" mdadm.static mdadm mdmon
@@ -85,6 +79,13 @@ fi
 %attr(0700,root,root) %dir /var/run/mdadm
 
 %changelog
+* Thu Feb 18 2010 Doug Ledford <dledford at redhat.com> - 3.1.1-0.gcd9a8b5.2
+- Fix s390/ppc64 UUID byte swap issue
+
+* Wed Feb 17 2010 Doug Ledford <dledford at redhat.com> - 3.1.1-0.gcd9a8b5.1
+- Update to head of upstream git repo, which contains a significant number
+  of bug fixes we need
+
 * Fri Jan 15 2010 Doug Ledford <dledford at redhat.com> - 3.0.3-3
 - Fix crash when AUTO keyword is in mdadm.conf (bz552342)
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/mdadm/F-13/sources,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -r1.27 -r1.28
--- sources	5 Nov 2009 21:30:16 -0000	1.27
+++ sources	18 Feb 2010 18:02:36 -0000	1.28
@@ -1 +1 @@
-1ab786dee6c65c68ea74199788bf88c7  mdadm-3.0.3.tar.bz2
+fd4bcda48d6dc3d6113b5c25950c9671  mdadm-3.1.1-gcd9a8b5.tar.bz2


--- mdadm-3.0-mdmon-dev-.mdadm.patch DELETED ---


--- mdadm-3.0-metadata.patch DELETED ---


--- mdadm-3.0-uuid.patch DELETED ---


--- mdadm-3.0.3-auto.patch DELETED ---


--- mdadm-3.0.3-intel-serial.patch DELETED ---



More information about the scm-commits mailing list