]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Fix endian bug in o2dlm protocol negotiation.
authorJoel Becker <joel.becker@oracle.com>
Tue, 12 Feb 2008 22:56:25 +0000 (14:56 -0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Mon, 10 Mar 2008 22:13:54 +0000 (15:13 -0700)
commit25e3f5cb55a82386299e01cb6ab7d707da0a8be8
tree3afad178b200b0a16e10ccaca2b05da1197034d4
parentfc3352b17b77f69125963234cbf4827484cd155c
ocfs2: Fix endian bug in o2dlm protocol negotiation.

struct dlm_query_join_packet is made up of four one-byte fields.  They
are effectively in big-endian order already.  However, little-endian
machines swap them before putting the packet on the wire (because
query_join's response is a status, and that status is treated as a u32
on the wire).  Thus, a big-endian and little-endian machines will
treat this structure differently.

The solution is to have little-endian machines swap the structure when
converting from the structure to the u32 representation.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/dlm/dlmcommon.h
fs/ocfs2/dlm/dlmdomain.c