X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fdev-dax.c;h=0660bba563e6a4a522ba5ace408b78ffe4744e3c;hb=38c1392ef60367a29e25c2aba384de586288aa62;hp=235a31e640b17d69c42df5a53aa25b697ca16aec;hpb=a09986004635b75f82c13c0674bae671a89fb065;p=fio.git diff --git a/engines/dev-dax.c b/engines/dev-dax.c index 235a31e6..0660bba5 100644 --- a/engines/dev-dax.c +++ b/engines/dev-dax.c @@ -157,7 +157,7 @@ static int fio_devdax_prep(struct thread_data *td, struct io_u *io_u) * It fits within existing mapping, use it */ if (io_u->offset >= fdd->devdax_off && - io_u->offset + io_u->buflen < fdd->devdax_off + fdd->devdax_sz) + io_u->offset + io_u->buflen <= fdd->devdax_off + fdd->devdax_sz) goto done; /* @@ -182,7 +182,8 @@ done: return 0; } -static int fio_devdax_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_devdax_queue(struct thread_data *td, + struct io_u *io_u) { fio_ro_check(td, io_u); io_u->error = 0; @@ -307,6 +308,7 @@ fio_devdax_get_file_size(struct thread_data *td, struct fio_file *f) if (rc < 0) { log_err("%s: fscanf on %s failed (%s)\n", td->o.name, spath, strerror(errno)); + fclose(sfile); return 1; }