Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/guoanwu/fio
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/guoanwu/fio:
  pmemblk.c: fix one logic bug - read always with write
  • Loading branch information
axboe committed May 25, 2022
2 parents 6f1a245 + b60ccee commit a284033
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions engines/pmemblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,11 @@ static enum fio_q_status fio_pmemblk_queue(struct thread_data *td,
off /= pmb->pmb_bsize;
len /= pmb->pmb_bsize;
while (0 < len) {
if (io_u->ddir == DDIR_READ &&
0 != pmemblk_read(pmb->pmb_pool, buf, off)) {
io_u->error = errno;
break;
if (io_u->ddir == DDIR_READ) {
if (0 != pmemblk_read(pmb->pmb_pool, buf, off)) {
io_u->error = errno;
break;
}
} else if (0 != pmemblk_write(pmb->pmb_pool, buf, off)) {
io_u->error = errno;
break;
Expand Down

0 comments on commit a284033

Please sign in to comment.