[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/io/description: dist-twod-stripe.c

CVS commit program cvs at parl.clemson.edu
Mon Jun 23 09:41:52 EDT 2008


Update of /projects/cvsroot/pvfs2-1/src/io/description
In directory parlweb1:/tmp/cvs-serv9865/src/io/description

Modified Files:
	dist-twod-stripe.c 
Log Message:
patch from Kyle Schochenmaier to make twod_stripe distribution parameters
work correctly on 64 bit systems


Index: dist-twod-stripe.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/io/description/dist-twod-stripe.c,v
diff -p -u -r1.4 -r1.5
--- dist-twod-stripe.c	3 Feb 2008 14:47:21 -0000	1.4
+++ dist-twod-stripe.c	23 Jun 2008 13:41:52 -0000	1.5
@@ -433,29 +433,29 @@ static int set_param(const char* dist_na
     }
     else if(strcmp(param_name, "num_groups")==0)
     {
-        if(*(uint32_t*)value <= 0)
+        if(*(int64_t*)value <= 0)
         {
             gossip_err("ERROR: num_groups param <= 0!\n");
         }
         else
         {
             gossip_debug(GOSSIP_DIST_DEBUG,
-                         "%s: num_groups: %d\n",
-                         __func__, *(uint32_t*)value);
-            dparam->num_groups = *(uint32_t*)value;
+                         "%s: num_groups: %lld\n",
+                         __func__, lld(*(int64_t*)value));
+            dparam->num_groups = *(int64_t*)value;
         }
     }
     else if(strcmp(param_name, "group_strip_factor")==0)
     {
-        if(*(uint32_t*)value <= 0)
+        if(*(int64_t*)value <= 0)
             gossip_err("ERROR: group_strip_factor param <= 0!\n");
         else
         {
             gossip_debug(GOSSIP_DIST_DEBUG,
-                         "%s: group_strip_factor: %d\n",
-                         __func__,*(uint32_t*)value);
+                         "%s: group_strip_factor: %lld\n",
+                         __func__,lld(*(int64_t*)value));
 
-            dparam->group_strip_factor = *(uint32_t*)value;
+            dparam->group_strip_factor = *(int64_t*)value;
         }
     }
     else
@@ -470,7 +470,7 @@ static void encode_params(char **pptr, v
     PVFS_twod_stripe_params *dparam =(PVFS_twod_stripe_params*)params;
     encode_uint32_t(pptr,&dparam->num_groups);
     encode_PVFS_size(pptr, &dparam->strip_size);
-    encode_int32_t(pptr,&dparam->group_strip_factor);
+    encode_uint32_t(pptr,&dparam->group_strip_factor);
 }
 
 



More information about the Pvfs2-cvs mailing list