[PVFS2-CVS] commit by neill in pvfs2/src/client/sysint: sys-io.sm
CVS commit program
cvs at parl.clemson.edu
Tue Nov 16 10:16:57 EST 2004
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb:/tmp/cvs-serv27295/src/client/sysint
Modified Files:
sys-io.sm
Log Message:
- another case of "never allow zero-fill size to be -1; remove assert since
it possibly can be though"
- a gossip change
Index: sys-io.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-io.sm,v
diff -p -u -r1.109 -r1.110
--- sys-io.sm 15 Nov 2004 19:06:43 -0000 1.109
+++ sys-io.sm 16 Nov 2004 15:16:57 -0000 1.110
@@ -1333,7 +1333,7 @@ static int io_analyze_size_results(
if (zero_fill_size > -1)
{
gossip_debug(GOSSIP_IO_DEBUG, "computed zero fill size of %Ld "
- "at offset %Ld\n", Ld(zero_fill_size),
+ "at memory offset %Ld\n", Ld(zero_fill_size),
Ld(sm_p->u.io.total_size));
memset((char *)(sm_p->u.io.buffer + sm_p->u.io.total_size),
@@ -1945,19 +1945,21 @@ static inline int check_for_zero_fill_on
zero_fill_size = sm_p->u.io.size -
cur_ctx->flow_desc.file_req_offset;
}
- assert(zero_fill_size > -1);
- gossip_debug(GOSSIP_IO_DEBUG, " SHORT read -- "
- "zero filling %Ld bytes at offset %Ld\n",
- Ld(zero_fill_size), Ld(zero_fill_offset));
+ if (zero_fill_size > -1)
+ {
+ gossip_debug(GOSSIP_IO_DEBUG, " SHORT read -- "
+ "zero filling %Ld bytes at offset %Ld\n",
+ Ld(zero_fill_size), Ld(zero_fill_offset));
- memset((char *)(cur_ctx->flow_desc.dest.u.mem.buffer +
- zero_fill_offset), 0, zero_fill_size);
+ memset((char *)(cur_ctx->flow_desc.dest.u.mem.buffer +
+ zero_fill_offset), 0, zero_fill_size);
- sm_p->u.io.total_size += zero_fill_size;
+ sm_p->u.io.total_size += zero_fill_size;
- /* exit loop -- we're done zero-filling */
- break;
+ /* exit loop -- we're done zero-filling */
+ break;
+ }
}
else
{
More information about the PVFS2-CVS
mailing list