Skip to content

Commit

Permalink
fix bug for unused io server in non-contiguous io
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Dalessandro committed Feb 25, 2008
1 parent 5687d77 commit 513db85
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/client/sysint/sys-osd-io.sm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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__,
Expand Down

0 comments on commit 513db85

Please sign in to comment.