mmap IO engine cannot extend a file
[fio.git] / engines / sync.c
index 6a5b7d391ed206a465f8b2d1cbd7fcf550305c8f..5cf73662ad6dcc9f1e9893f12e34a3669d6e5124 100644 (file)
@@ -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;