Skip to content

Commit

Permalink
Merge branch 'zfs-0.7-release' into cstor168
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuitta authored Apr 26, 2018
2 parents ed669da + 638113e commit 6a5bd36
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/fio/replica.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ static int fio_repl_getevents(struct thread_data *td, unsigned int min,
unsigned int max, const struct timespec fio_unused *t)
{
struct netio_data *nd = td->io_ops_data;
int ret, count = 0;
int ret, read_error = 0, count = 0;
unsigned int i;
struct fio_file *f;
int timeout = -1;
Expand All @@ -753,7 +753,7 @@ static int fio_repl_getevents(struct thread_data *td, unsigned int min,
pfds[i].events = POLLIN;
}

while (count < min) {
while (!read_error && count < min) {
ret = poll(pfds, td->o.nr_files, timeout);
if (ret < 0) {
td_verror(td, errno, "poll");
Expand All @@ -766,13 +766,14 @@ static int fio_repl_getevents(struct thread_data *td, unsigned int min,
io_list_entry_t *ent;

ent = read_repl_reply(td, pfds[i].fd);
if (ent == NULL)
continue;

nd->io_completed[count++] = ent->io_u;
free(ent);
if (count >= max)
goto end;
if (ent == NULL) {
read_error = 1;
} else {
nd->io_completed[count++] = ent->io_u;
free(ent);
if (count >= max)
goto end;
}
}
}
}
Expand Down

0 comments on commit 6a5bd36

Please sign in to comment.