[Pvfs2-cvs] commit by kunkel in pvfs2/src/common/misc: pvfs2-hint.c

CVS commit program cvs at parl.clemson.edu
Sun Aug 20 04:44:37 EDT 2006


Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv16024/src/common/misc

Modified Files:
      Tag: kunkel-branch
	pvfs2-hint.c 
Log Message:
Bugfix for the calculation of the hint size, hints need more space due to
the 8 byte alignment.


Index: pvfs2-hint.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/Attic/pvfs2-hint.c,v
diff -p -u -r1.1.2.2 -r1.1.2.3
--- pvfs2-hint.c	19 Aug 2006 18:40:04 -0000	1.1.2.2
+++ pvfs2-hint.c	20 Aug 2006 08:44:37 -0000	1.1.2.3
@@ -41,7 +41,9 @@ int32_t PINT_hint_calc_size(const PVFS_h
     PVFS_hint * act;
     for( act = (PVFS_hint *) hint ; act != NULL ; act = act->next_hint){
         if (hint_transfer_to_server[act->type]){
-            count += 8 + act->length; 
+            /* length + type + act. string + 8-byte alignment (chosse bigger in case
+             * string is exactly divisible by 8)*/
+            count += 4 + 4 + act->length + 8 - act->length % 8; 
         }
     }
     return (int32_t) count;



More information about the Pvfs2-cvs mailing list