Skip to contentSkip to conversation

ocfs2: Vote message and response structures packed

Ocfs2-devel New Sunil Mushran 2 participants 3 messages Sep 20, 2007 OCFS2

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 ocfs2: Vote message and response structures packed

The ocfs2_vote_msg and ocfs2_response_msg structs needed to be packed to ensure similar sizeofs in 32-bit and 64-bit arches.

---
 fs/ocfs2/vote.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/ocfs2/vote.c +2 -2
index 66a13ee..c053585 100644
@@ -66,7 +66,7 @@ struct ocfs2_vote_msg
 {
 	struct ocfs2_msg_hdr v_hdr;
 	__be32 v_reserved1;
-};
+} __attribute__ ((packed));
 
 /* Responses are given these values to maintain backwards
  * compatibility with older ocfs2 versions */
@@ -78,7 +78,7 @@ struct ocfs2_response_msg
 {
 	struct ocfs2_msg_hdr r_hdr;
 	__be32 r_response;
-};
+} __attribute__ ((packed));
 
 struct ocfs2_vote_work {
 	struct list_head   w_list;
Signature · 1 line
1.5.2.5
Applied
#2 lore raw

PATCH 1/1 ocfs2: Vote message and response structures packed

Thanks, applied.

	--Mark
Quoted 38 lines · Sunil Mushran

The ocfs2_vote_msg and ocfs2_response_msg structs needed to be packed to ensure similar sizeofs in 32-bit and 64-bit arches.

---
 fs/ocfs2/vote.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/ocfs2/vote.c +2 -2
index 66a13ee..c053585 100644
@@ -66,7 +66,7 @@ struct ocfs2_vote_msg
 {
 	struct ocfs2_msg_hdr v_hdr;
 	__be32 v_reserved1;
-};
+} __attribute__ ((packed));
 
 /* Responses are given these values to maintain backwards
  * compatibility with older ocfs2 versions */
@@ -78,7 +78,7 @@ struct ocfs2_response_msg
 {
 	struct ocfs2_msg_hdr r_hdr;
 	__be32 r_response;
-};
+} __attribute__ ((packed));
 
 struct ocfs2_vote_work {
 	struct list_head   w_list;
Signature · 7 lines
1.5.2.5


_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]