[DRBD-cvs] drbd by phil; Every packet is now a multiple of 8 byte...

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Mon, 5 Jul 2004 15:33:03 +0200 (CEST)


DRBD CVS committal

Author  : phil
Module  : drbd

Dir     : drbd/drbd


Modified Files:
      Tag: rel-0_7-branch
	drbd_int.h drbd_main.c 


Log Message:
Every packet is now a multiple of 8 byte  (now 32bit machines and 64 bit
machines should be wire compatible...)

===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_int.h,v
retrieving revision 1.58.2.182
retrieving revision 1.58.2.183
diff -u -3 -r1.58.2.182 -r1.58.2.183
--- drbd_int.h	2 Jul 2004 11:58:45 -0000	1.58.2.182
+++ drbd_int.h	5 Jul 2004 13:32:58 -0000	1.58.2.183
@@ -437,6 +437,7 @@
 	u64         sector;
 	u64         block_id;
 	u32         blksize;
+	u32         pad;	//make sure packes it is a multiple of 8 Byte
 } Drbd_BlockAck_Packet __attribute((packed));
 
 typedef struct {
@@ -444,6 +445,7 @@
 	u64         sector;
 	u64         block_id;
 	u32         blksize;
+	u32         pad;	//make sure packes it is a multiple of 8 Byte
 } Drbd_BlockRequest_Packet __attribute((packed));
 
 /*
@@ -456,6 +458,7 @@
 typedef struct {
 	Drbd_Header head;
 	u32         barrier;   // may be 0 or a barrier number
+	u32         pad;	//make sure packes it is a multiple of 8 Byte
 } Drbd_Barrier_Packet  __attribute((packed));
 
 typedef struct {
@@ -485,6 +488,7 @@
 	u32         skip_sync;
 	u32         sync_group;
 	u32         flags; // flags & 1 -> reply call drbd_send_param(mdev);
+	u32         pad;	//make sure packes it is a multiple of 8 Byte
 } Drbd_Parameter_Packet  __attribute((packed));
 
 typedef union {
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_main.c,v
retrieving revision 1.73.2.196
retrieving revision 1.73.2.197
diff -u -3 -r1.73.2.196 -r1.73.2.197
--- drbd_main.c	5 Jul 2004 08:01:26 -0000	1.73.2.196
+++ drbd_main.c	5 Jul 2004 13:32:58 -0000	1.73.2.197
@@ -1627,6 +1627,13 @@
 	SZO(struct bio);
 	SZO(wait_queue_head_t);
 	SZO(spinlock_t);
+	SZO(Drbd_Header);
+	SZO(Drbd_Barrier_Packet);
+	SZO(Drbd_BarrierAck_Packet);
+	SZO(Drbd_SyncParam_Packet);
+	SZO(Drbd_Parameter_Packet);
+	SZO(Drbd_Data_Packet);
+	SZO(Drbd_BlockAck_Packet);
 	printk(KERN_ERR "AL_EXTENTS_PT = %d\n",AL_EXTENTS_PT);
 	return -EBUSY;
 #endif