X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fsync.c;h=5cf73662ad6dcc9f1e9893f12e34a3669d6e5124;hp=6a5b7d391ed206a465f8b2d1cbd7fcf550305c8f;hb=145dad6d3e1ae4bf44dd49eea9d0c025500b97d0;hpb=36167d82e5f49dee91c6d2cd426068edee90e36f diff --git a/engines/sync.c b/engines/sync.c index 6a5b7d39..5cf73662 100644 --- a/engines/sync.c +++ b/engines/sync.c @@ -41,7 +41,7 @@ static int fio_syncio_queue(struct thread_data *td, struct io_u *io_u) ret = fsync(f->fd); if (ret != (int) io_u->xfer_buflen) { - if (ret > 0) { + if (ret >= 0) { io_u->resid = io_u->xfer_buflen - ret; io_u->error = 0; return FIO_Q_COMPLETED;