X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fsync.c;h=597ee0127a39d1a5d30f0609d366b3fb5d9230e7;hb=ad92396cc21055cee93470dcf65e82ccde03aac5;hp=b1776d210d4cb42765935238b747d047870e34ec;hpb=b5af82930ccfd7dda6a1b11794efb452eb76d8dc;p=fio.git diff --git a/engines/sync.c b/engines/sync.c index b1776d21..597ee012 100644 --- a/engines/sync.c +++ b/engines/sync.c @@ -1,5 +1,8 @@ /* - * regular read/write sync io engine + * sync engine + * + * IO engine that does regular read(2)/write(2) with lseek(2) to transfer + * data. * */ #include @@ -9,7 +12,6 @@ #include #include "../fio.h" -#include "../os.h" static int fio_syncio_prep(struct thread_data *td, struct io_u *io_u) { @@ -33,6 +35,8 @@ static int fio_syncio_queue(struct thread_data *td, struct io_u *io_u) struct fio_file *f = io_u->file; int ret; + fio_ro_check(td, io_u); + if (io_u->ddir == DDIR_READ) ret = read(f->fd, io_u->xfer_buf, io_u->xfer_buflen); else if (io_u->ddir == DDIR_WRITE)