[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/server: create.sm

CVS commit program cvs at parl.clemson.edu
Thu Feb 28 09:55:03 EST 2008


Update of /projects/cvsroot/pvfs2-1/src/server
In directory parlweb1:/tmp/cvs-serv10091/src/server

Modified Files:
      Tag: small-file-branch
	create.sm 
Log Message:
make sure to store dfile count of 1 when creating stuffed files, also
minor variable cleanup.  Current setup allows reads and writes to
stuffed files again.


Index: create.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/server/create.sm,v
diff -p -u -r1.46.6.5 -r1.46.6.6
--- create.sm	26 Feb 2008 15:56:44 -0000	1.46.6.5
+++ create.sm	28 Feb 2008 14:55:03 -0000	1.46.6.6
@@ -326,24 +326,23 @@ static PINT_sm_action setup_stuffed_data
     struct PINT_smcb *smcb, job_status_s *js_p)
 {
     struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
-    PVFS_handle *harray;
 
     gossip_debug(
         GOSSIP_SERVER_DEBUG, "Stuffed metafile handle created: %llu\n",
         llu(js_p->handle));
     assert(js_p->error_code == 0);
 
-    harray = malloc(sizeof(PVFS_handle));
-    if(!harray)
+    s_op->resp.u.create.datafile_handles = malloc(sizeof(PVFS_handle));
+    if(!s_op->resp.u.create.datafile_handles)
     {
         js_p->error_code = -PVFS_ENOMEM;
         return SM_ACTION_COMPLETE;
     }
 
-    harray[0] = js_p->handle;
-
-    s_op->resp.u.create.datafile_handles = harray;
+    s_op->req->u.create.attr.u.meta.dfile_count = 1;
     s_op->resp.u.create.datafile_count = 1;
+    s_op->resp.u.create.datafile_handles[0] = js_p->handle;
+
     return SM_ACTION_COMPLETE;
 }
 



More information about the Pvfs2-cvs mailing list