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

[email protected] <[email protected]>
Newsgroups com.redhat.cluster-devel
Message-ID <[email protected]>
CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2008-01-21 20:21: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&r1=1.36&r2=1.37

--- cluster/group/gfs_controld/plock.c	2007/11/30 16:20:55	1.36
+++ cluster/group/gfs_controld/plock.c	2008/01/21 20:21:08	1.37
@@ -1044,13 +1044,14 @@
 	}
 	memset(buf, 0, len);
 
+	info_bswap_out(in);
+
 	hd = (struct gdlm_header *)buf;
 	hd->type = msg_type;
 	hd->nodeid = our_nodeid;
 	hd->to_nodeid = 0;
 
 	memcpy(buf + sizeof(struct gdlm_header), in, sizeof(*in));
-	info_bswap_out((struct gdlm_plock_info *) buf + sizeof(*hd));
 
 	rv = send_group_message(mg, len, buf);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.