diff --git a/src/client/sysint/sys-osd-io.sm b/src/client/sysint/sys-osd-io.sm index 9946a3a..fa62fd0 100644 --- a/src/client/sysint/sys-osd-io.sm +++ b/src/client/sysint/sys-osd-io.sm @@ -266,7 +266,7 @@ static int osd_io_setup_msgpairs(struct PINT_smcb *smcb, job_status_s *js_p) this_aggregate_size += sresult.bytes; gossip_debug(GOSSIP_IO_DEBUG, "%s: Current Offset %lld\n", __func__, - lld(target_offset[0])); + lld(target_offset[i])); #if 0 printf("SERVER INFO [%d]:\n", i); @@ -366,20 +366,22 @@ static int osd_io_setup_msgpairs(struct PINT_smcb *smcb, job_status_s *js_p) /* Build the command for this server, using physical offset. */ if (io->io_type == PVFS_IO_READ) { osd_command_set_read(command, PVFS_OSD_DATA_PID, datafile_handle, - len, target_offset[0]); + len, target_offset[i]); command->indata = p; command->inlen_alloc = len; command->iov_inlen = csegs_count; } else if (io->io_type == PVFS_IO_WRITE) { osd_command_set_write(command, PVFS_OSD_DATA_PID, datafile_handle, - len, target_offset[0]); + len, target_offset[i]); command->outdata = p; command->outlen = len; command->iov_outlen = csegs_count; } - } else { /* either need a SGL or optimized SGL */ + //~ printf("CONFIG\n"); + + } else if (sresult.segs > 0) { /* either need a SGL or optimized SGL */ int j, flag, stride, segl, total_len; void *sgl = NULL; len = 0; @@ -567,14 +569,21 @@ static int osd_io_setup_msgpairs(struct PINT_smcb *smcb, job_status_s *js_p) command->outdata = sgl; command->outlen = ddt_size; - } - else { + } else { ret = -EINVAL; goto out; } - } + //~ printf("NON-CONTIG\n"); + } else { + /* Nothing to do for this server */ + gossip_debug(GOSSIP_IO_DEBUG, "%s: Nothing to do for server [%d]", + __func__, i); + + sm_p->msgarray[i].suppress = 1; /* disable this entry */ + continue; + } } gossip_debug(GOSSIP_IO_DEBUG, "%s: Aggreagte Transferred: %lld\n", __func__,