[EMAIL PROTECTED] wrote on Sun, 20 Aug 2006 04:44 -0400:
> 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;

For an 8-char string, this adds an extra 8 bytes of padding
unnecessarily.  Try roundup8(act->length), already in the tree.

                -- Pete
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to