[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/group/gfs_controld plock.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL51
Changes by:	teigland sourceware org	2008-01-21 20:19:08

Modified files:
	group/gfs_controld: plock.c 

Log message:
	bz 429546
	
	Fix an alignment problem with ppc64.  Things work if we do the
	byte-swapping on the original structure and then copy it into the
	final buffer, instead of copying first and then trying to do the
	byte-swapping at an offset within the send buffer.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.25.2.6&r2=1.25.2.6.2.1

--- cluster/group/gfs_controld/plock.c	2007/06/08 21:31:56	1.25.2.6
+++ cluster/group/gfs_controld/plock.c	2008/01/21 20:19:08	1.25.2.6.2.1
@@ -399,15 +399,14 @@
 
 	info.nodeid = our_nodeid;
 
+	info_bswap_out(&info);
+
 	hd = (struct gdlm_header *)buf;
 	hd->type = MSG_PLOCK;
 	hd->nodeid = our_nodeid;
 	hd->to_nodeid = 0;
 	memcpy(buf + sizeof(struct gdlm_header), &info, sizeof(info));
 
-	info_bswap_out((struct gdlm_plock_info *) buf +
-						  sizeof(struct gdlm_header));
-
 	rv = send_group_message(mg, len, buf);
 
 	free(buf);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]