diff --git a/engines/cpu.c b/engines/cpu.c index 37f9bbad50..09872508e1 100644 --- a/engines/cpu.c +++ b/engines/cpu.c @@ -53,8 +53,8 @@ static struct fio_option options[] = { }; -static enum fio_q_status -fio_cpuio_queue(struct thread_data *td, struct io_u fio_unused *io_u) +static enum fio_q_status fio_cpuio_queue(struct thread_data *td, + struct io_u fio_unused *io_u) { struct cpu_options *co = td->eo; diff --git a/engines/dev-dax.c b/engines/dev-dax.c index 807d8505b2..0660bba563 100644 --- a/engines/dev-dax.c +++ b/engines/dev-dax.c @@ -182,8 +182,8 @@ static int fio_devdax_prep(struct thread_data *td, struct io_u *io_u) return 0; } -static enum fio_q_status -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; diff --git a/engines/e4defrag.c b/engines/e4defrag.c index 22d5231258..8f71d02caa 100644 --- a/engines/e4defrag.c +++ b/engines/e4defrag.c @@ -127,8 +127,8 @@ static void fio_e4defrag_cleanup(struct thread_data *td) } -static enum fio_q_status -fio_e4defrag_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_e4defrag_queue(struct thread_data *td, + struct io_u *io_u) { int ret; diff --git a/engines/falloc.c b/engines/falloc.c index a1f6a242b1..6382569b9a 100644 --- a/engines/falloc.c +++ b/engines/falloc.c @@ -65,9 +65,10 @@ static int open_file(struct thread_data *td, struct fio_file *f) #endif #ifndef FALLOC_FL_PUNCH_HOLE #define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */ -#endif -static enum fio_q_status -fio_fallocate_queue(struct thread_data *td, struct io_u *io_u) +#endif + +static enum fio_q_status fio_fallocate_queue(struct thread_data *td, + struct io_u *io_u) { struct fio_file *f = io_u->file; int ret; diff --git a/engines/filecreate.c b/engines/filecreate.c index fb3f389791..39a2950293 100644 --- a/engines/filecreate.c +++ b/engines/filecreate.c @@ -55,8 +55,8 @@ static int open_file(struct thread_data *td, struct fio_file *f) return 0; } -static enum fio_q_status -queue_io(struct thread_data *td, struct io_u fio_unused *io_u) +static enum fio_q_status queue_io(struct thread_data *td, + struct io_u fio_unused *io_u) { return FIO_Q_COMPLETED; } diff --git a/engines/ftruncate.c b/engines/ftruncate.c index 4ff511ea7e..c7ad038c0a 100644 --- a/engines/ftruncate.c +++ b/engines/ftruncate.c @@ -11,19 +11,20 @@ #include "../fio.h" -static enum fio_q_status -fio_ftruncate_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_ftruncate_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_WRITE) { io_u->error = EINVAL; return FIO_Q_COMPLETED; } - ret = ftruncate(f->fd, io_u->offset); + ret = ftruncate(f->fd, io_u->offset); if (ret) io_u->error = errno; diff --git a/engines/guasi.c b/engines/guasi.c index 4d33290850..cb26802cce 100644 --- a/engines/guasi.c +++ b/engines/guasi.c @@ -113,8 +113,8 @@ static int fio_guasi_getevents(struct thread_data *td, unsigned int min, return n; } -static enum fio_q_status -fio_guasi_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_guasi_queue(struct thread_data *td, + struct io_u *io_u) { struct guasi_data *ld = td->io_ops_data; diff --git a/engines/libaio.c b/engines/libaio.c index 0e2263a743..f46b331458 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -177,8 +177,8 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min, return r < 0 ? r : events; } -static enum fio_q_status -fio_libaio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_libaio_queue(struct thread_data *td, + struct io_u *io_u) { struct libaio_data *ld = td->io_ops_data; diff --git a/engines/libhdfs.c b/engines/libhdfs.c index 37694fafcb..6000160129 100644 --- a/engines/libhdfs.c +++ b/engines/libhdfs.c @@ -165,8 +165,8 @@ static int fio_hdfsio_prep(struct thread_data *td, struct io_u *io_u) return 0; } -static enum fio_q_status -fio_hdfsio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_hdfsio_queue(struct thread_data *td, + struct io_u *io_u) { struct hdfsio_data *hd = td->io_ops_data; struct hdfsio_options *options = td->eo; diff --git a/engines/libpmem.c b/engines/libpmem.c index c3abe2a055..21ff4f66d3 100644 --- a/engines/libpmem.c +++ b/engines/libpmem.c @@ -457,8 +457,8 @@ static int fio_libpmem_prep(struct thread_data *td, struct io_u *io_u) return 0; } -static enum fio_q_status -fio_libpmem_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_libpmem_queue(struct thread_data *td, + struct io_u *io_u) { fio_ro_check(td, io_u); io_u->error = 0; diff --git a/engines/mmap.c b/engines/mmap.c index 856547befd..308b466544 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -177,8 +177,8 @@ static int fio_mmapio_prep(struct thread_data *td, struct io_u *io_u) return 0; } -static enum fio_q_status -fio_mmapio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_mmapio_queue(struct thread_data *td, + struct io_u *io_u) { struct fio_file *f = io_u->file; struct fio_mmap_data *fmd = FILE_ENG_DATA(f); diff --git a/engines/mtd.c b/engines/mtd.c index 9e154836a5..b9f431643f 100644 --- a/engines/mtd.c +++ b/engines/mtd.c @@ -71,8 +71,8 @@ static int fio_mtd_is_bad(struct thread_data *td, return ret; } -static enum fio_q_status -fio_mtd_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_mtd_queue(struct thread_data *td, + struct io_u *io_u) { struct fio_file *f = io_u->file; struct fio_mtd_data *fmd = FILE_ENG_DATA(f); diff --git a/engines/net.c b/engines/net.c index 8c25c4e5b1..ca6fb344b8 100644 --- a/engines/net.c +++ b/engines/net.c @@ -642,8 +642,9 @@ static int fio_netio_recv(struct thread_data *td, struct io_u *io_u) return ret; } -static enum fio_q_status -__fio_netio_queue(struct thread_data *td, struct io_u *io_u, enum fio_ddir ddir) +static enum fio_q_status __fio_netio_queue(struct thread_data *td, + struct io_u *io_u, + enum fio_ddir ddir) { struct netio_data *nd = td->io_ops_data; struct netio_options *o = td->eo; @@ -687,8 +688,8 @@ __fio_netio_queue(struct thread_data *td, struct io_u *io_u, enum fio_ddir ddir) return FIO_Q_COMPLETED; } -static enum fio_q_status -fio_netio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_netio_queue(struct thread_data *td, + struct io_u *io_u) { struct netio_options *o = td->eo; int ret; diff --git a/engines/null.c b/engines/null.c index b1718e5c9a..4cc0102b99 100644 --- a/engines/null.c +++ b/engines/null.c @@ -56,8 +56,8 @@ static int null_commit(struct thread_data *td, struct null_data *nd) return 0; } -static enum fio_q_status -null_queue(struct thread_data *td, struct null_data *nd, struct io_u *io_u) +static enum fio_q_status null_queue(struct thread_data *td, + struct null_data *nd, struct io_u *io_u) { fio_ro_check(td, io_u); @@ -118,8 +118,8 @@ static int fio_null_commit(struct thread_data *td) return null_commit(td, td->io_ops_data); } -static enum fio_q_status -fio_null_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_null_queue(struct thread_data *td, + struct io_u *io_u) { return null_queue(td, td->io_ops_data, io_u); } diff --git a/engines/pmemblk.c b/engines/pmemblk.c index e2c558929f..45f6fb6501 100644 --- a/engines/pmemblk.c +++ b/engines/pmemblk.c @@ -342,8 +342,8 @@ static int fio_pmemblk_get_file_size(struct thread_data *td, struct fio_file *f) return 0; } -static enum fio_q_status -fio_pmemblk_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_pmemblk_queue(struct thread_data *td, + struct io_u *io_u) { struct fio_file *f = io_u->file; fio_pmemblk_file_t pmb = FILE_ENG_DATA(f); diff --git a/engines/rados.c b/engines/rados.c index f3795c5742..c6aec730e3 100644 --- a/engines/rados.c +++ b/engines/rados.c @@ -251,8 +251,8 @@ static void fio_rados_cleanup(struct thread_data *td) } } -static enum fio_q_status -fio_rados_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_rados_queue(struct thread_data *td, + struct io_u *io_u) { struct rados_data *rados = td->io_ops_data; struct fio_rados_iou *fri = io_u->engine_data; diff --git a/engines/rbd.c b/engines/rbd.c index cf7337f007..081b4a040f 100644 --- a/engines/rbd.c +++ b/engines/rbd.c @@ -462,8 +462,8 @@ static int fio_rbd_getevents(struct thread_data *td, unsigned int min, return events; } -static enum fio_q_status -fio_rbd_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_rbd_queue(struct thread_data *td, + struct io_u *io_u) { struct rbd_data *rbd = td->io_ops_data; struct fio_rbd_iou *fri = io_u->engine_data; diff --git a/engines/rdma.c b/engines/rdma.c index 67c5aa7e23..2569a8e32e 100644 --- a/engines/rdma.c +++ b/engines/rdma.c @@ -791,8 +791,8 @@ static int fio_rdmaio_recv(struct thread_data *td, struct io_u **io_us, return i; } -static enum fio_q_status -fio_rdmaio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_rdmaio_queue(struct thread_data *td, + struct io_u *io_u) { struct rdmaio_data *rd = td->io_ops_data; diff --git a/engines/sg.c b/engines/sg.c index 56e5d18ab6..d4848bc582 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -236,9 +236,9 @@ static int fio_sgio_getevents(struct thread_data *td, unsigned int min, return r; } -static enum fio_q_status -fio_sgio_ioctl_doio(struct thread_data *td, struct fio_file *f, - struct io_u *io_u) +static enum fio_q_status fio_sgio_ioctl_doio(struct thread_data *td, + struct fio_file *f, + struct io_u *io_u) { struct sgio_data *sd = td->io_ops_data; struct sg_io_hdr *hdr = &io_u->hdr; @@ -378,8 +378,8 @@ static int fio_sgio_prep(struct thread_data *td, struct io_u *io_u) return 0; } -static enum fio_q_status -fio_sgio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_sgio_queue(struct thread_data *td, + struct io_u *io_u) { struct sg_io_hdr *hdr = &io_u->hdr; int ret, do_sync = 0; diff --git a/engines/skeleton_external.c b/engines/skeleton_external.c index 7e08afbb0f..21a3601824 100644 --- a/engines/skeleton_external.c +++ b/engines/skeleton_external.c @@ -90,8 +90,8 @@ static int fio_skeleton_cancel(struct thread_data *td, struct io_u *io_u) * io_u->xfer_buflen. Residual data count may be set in io_u->resid * for a short read/write. */ -static enum fio_q_status -fio_skeleton_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_skeleton_queue(struct thread_data *td, + struct io_u *io_u) { /* * Double sanity check to catch errant write on a readonly setup diff --git a/engines/splice.c b/engines/splice.c index 18403608cb..feb764feb2 100644 --- a/engines/splice.c +++ b/engines/splice.c @@ -199,8 +199,8 @@ static int fio_splice_write(struct thread_data *td, struct io_u *io_u) return io_u->xfer_buflen; } -static enum fio_q_status -fio_spliceio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_spliceio_queue(struct thread_data *td, + struct io_u *io_u) { struct spliceio_data *sd = td->io_ops_data; int ret = 0; diff --git a/engines/sync.c b/engines/sync.c index 722320ef6d..3f36da824e 100644 --- a/engines/sync.c +++ b/engines/sync.c @@ -110,8 +110,8 @@ static int fio_io_end(struct thread_data *td, struct io_u *io_u, int ret) } #ifdef CONFIG_PWRITEV -static enum fio_q_status -fio_pvsyncio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_pvsyncio_queue(struct thread_data *td, + struct io_u *io_u) { struct syncio_data *sd = td->io_ops_data; struct iovec *iov = &sd->iovecs[0]; @@ -138,8 +138,8 @@ fio_pvsyncio_queue(struct thread_data *td, struct io_u *io_u) #endif #ifdef FIO_HAVE_PWRITEV2 -static enum fio_q_status -fio_pvsyncio2_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_pvsyncio2_queue(struct thread_data *td, + struct io_u *io_u) { struct syncio_data *sd = td->io_ops_data; struct psyncv2_options *o = td->eo; @@ -170,9 +170,8 @@ fio_pvsyncio2_queue(struct thread_data *td, struct io_u *io_u) } #endif - -static enum fio_q_status -fio_psyncio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_psyncio_queue(struct thread_data *td, + struct io_u *io_u) { struct fio_file *f = io_u->file; int ret; @@ -192,8 +191,8 @@ fio_psyncio_queue(struct thread_data *td, struct io_u *io_u) return fio_io_end(td, io_u, ret); } -static enum fio_q_status -fio_syncio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_syncio_queue(struct thread_data *td, + struct io_u *io_u) { struct fio_file *f = io_u->file; int ret; @@ -264,8 +263,8 @@ static void fio_vsyncio_set_iov(struct syncio_data *sd, struct io_u *io_u, sd->queued++; } -static enum fio_q_status -fio_vsyncio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_vsyncio_queue(struct thread_data *td, + struct io_u *io_u) { struct syncio_data *sd = td->io_ops_data; diff --git a/engines/windowsaio.c b/engines/windowsaio.c index 2b932f7146..13d7f19402 100644 --- a/engines/windowsaio.c +++ b/engines/windowsaio.c @@ -354,8 +354,8 @@ static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min, return dequeued; } -static enum fio_q_status -fio_windowsaio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_windowsaio_queue(struct thread_data *td, + struct io_u *io_u) { struct fio_overlapped *o = io_u->engine_data; LPOVERLAPPED lpOvl = &o->o;