[Pvfs2-cvs] commit by sson in pvfs2/src/server: io.sm write.sm

CVS commit program cvs at parl.clemson.edu
Tue Apr 14 18:18:53 EDT 2009


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

Modified Files:
      Tag: as-branch
	io.sm write.sm 
Log Message:
modified segpool_init() to set proper file_request_state
and some bugs in the io.sm file.
now it is working without errors.



Index: io.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/io.sm,v
diff -p -u -r1.73.6.1 -r1.73.6.2
--- io.sm	14 Apr 2009 20:19:50 -0000	1.73.6.1
+++ io.sm	14 Apr 2009 22:18:53 -0000	1.73.6.2
@@ -346,11 +346,11 @@ static PINT_sm_action start_pipeline_sm(
 	ret = PINT_segpool_init(s_op->u.io.flow_d->mem_req,
 				s_op->u.io.flow_d->file_req,
 				s_op->u.io.flow_d->file_data.fsize,
+				s_op->u.io.flow_d->file_req_offset,
 				s_op->u.io.flow_d->aggregate_size,
 				s_op->u.io.flow_d->file_data.server_nr,
 				s_op->u.io.flow_d->file_data.server_ct,
 				s_op->u.io.flow_d->file_data.dist, /* dist */
-				s_op->u.io.flow_d->file_req_offset, /* sson */
 				PINT_SP_SERVER_READ,
 				&seg_handle);
 
@@ -384,12 +384,12 @@ static PINT_sm_action start_pipeline_sm(
 	PINT_dist_lookup(s_op->u.io.flow_d->file_data.dist);
 	ret = PINT_segpool_init(s_op->u.io.flow_d->mem_req,
 				 s_op->u.io.flow_d->file_req,
-				s_op->u.io.flow_d->file_data.fsize, /* FIXME?? */
+				s_op->u.io.flow_d->file_data.fsize,
+				s_op->u.io.flow_d->file_req_offset, /* sson */
 				s_op->u.io.flow_d->aggregate_size,
 				 s_op->u.io.flow_d->file_data.server_nr,
 				 s_op->u.io.flow_d->file_data.server_ct,
 				 s_op->u.io.flow_d->file_data.dist, /* dist */
-				s_op->u.io.flow_d->file_req_offset, /* sson */
 				 PINT_SP_SERVER_WRITE,
 				 &seg_handle);
 

Index: write.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/Attic/write.sm,v
diff -p -u -r1.1.2.1 -r1.1.2.2
--- write.sm	14 Apr 2009 20:20:43 -0000	1.1.2.1
+++ write.sm	14 Apr 2009 22:18:53 -0000	1.1.2.2
@@ -109,16 +109,17 @@ static PINT_sm_action bmi_recv_call(stru
     bytes = q_item->parent->buffer_size;
     PINT_segpool_take_segments(seg_handle, id, &bytes, &count, &offsets, &sizes);
     gossip_debug(GOSSIP_IO_DEBUG, "%s: 3: count=%d, bytes=%d\n", __func__, count, bytes);
-    if(count == 0) {
-	js_p->error_code = 0;
-	return SM_ACTION_COMPLETE;
-    }
     q_item->buffer_used = bytes;
     s_op->u.flow_write.offsets = offsets;
     s_op->u.flow_write.sizes = sizes;
     s_op->u.flow_write.segs = count;
 
     if(count == 0) {
+	js_p->error_code = 0;
+	return SM_ACTION_COMPLETE;
+    }
+#if 0
+    if(count == 0) {
 	if(flow_data->parent->total_transferred ==
 	   flow_data->total_bytes_processed &&
 	   PINT_REQUEST_DONE(flow_data->parent->file_req_state)) {
@@ -130,7 +131,7 @@ static PINT_sm_action bmi_recv_call(stru
 	js_p->error_code = 0;
 	return SM_ACTION_COMPLETE;
     }
-#if 0
+
     gossip_debug(GOSSIP_DIRECTIO_DEBUG,
 		 "offset %llu, buffer ptr: %p\n",
 		 llu(q_item->result_chain.result.offset_array[0]),
@@ -195,6 +196,10 @@ static PINT_sm_action trove_write_call(s
     gossip_debug(GOSSIP_IO_DEBUG, "%s: q_item->buffer[0]=%s\n", __func__,
 		 (char *)q_item->buffer);
 
+    if(s_op->u.flow_read.segs == 0 && q_item->buffer_used == 0) {
+	js_p->error_code = 0;
+	return SM_ACTION_COMPLETE;
+    }
 #if 0
 	gossip_debug(GOSSIP_IO_DEBUG, "%s: result_tmp->buffer_offset=%x\n", 
 			__func__, result_tmp->buffer_offset);



More information about the Pvfs2-cvs mailing list