[PVFS2-CVS]
commit by slang in pvfs2/src/io/trove/trove-dbpf: dbpf-bstream.c
CVS commit program
cvs at parl.clemson.edu
Mon Jan 9 20:08:19 EST 2006
Update of /anoncvs/pvfs2/src/io/trove/trove-dbpf
In directory parlweb:/tmp/cvs-serv19802/src/io/trove/trove-dbpf
Modified Files:
dbpf-bstream.c
Log Message:
This fixes a bug where invalid sizes were being written on servers that were past the first strip. It was created from the previous fixes to send the total_bytes to the server for the small_io operation (which are in still needed for writes). The PINT_REQUEST_STATE_SET_FINAL macro actually needs the entire size of the request, not just the bytes sent to this server.
Index: dbpf-bstream.c
===================================================================
RCS file: /anoncvs/pvfs2/src/io/trove/trove-dbpf/dbpf-bstream.c,v
diff -p -u -r1.60 -r1.61
--- dbpf-bstream.c 14 Dec 2005 21:50:28 -0000 1.60
+++ dbpf-bstream.c 10 Jan 2006 01:08:16 -0000 1.61
@@ -1126,10 +1126,18 @@ static int dbpf_bstream_rw_list_op_svc(s
"WRITE" : "READ"), ret,
op_p->u.b_rw_list.fd);
- /* we need to set the out size for the caller of write_list or
- * read_list
+ /* aio_return doesn't seem to return bytes read/written if
+ * sigev_notify == SIGEV_NONE, so we set the out size
+ * from what's requested. For reads we just leave as zero,
+ * which ends up being OK,
+ * since the amount read (if past EOF its less than requested)
+ * is determined from the bstream size.
*/
- *(op_p->u.b_rw_list.out_size_p) += ret;
+ if(op_p->type == BSTREAM_WRITE_LIST ||
+ op_p->type == BSTREAM_WRITE_AT)
+ {
+ *(op_p->u.b_rw_list.out_size_p) += aiocb_p[i].aio_nbytes;
+ }
/* mark as a NOP so we ignore it from now on */
aiocb_p[i].aio_lio_opcode = LIO_NOP;
More information about the PVFS2-CVS
mailing list