From 2e4ef4fbd69eb6d4c07f2f362463e3f3df2e808c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 20 Apr 2018 09:46:19 -0600 Subject: [PATCH] engines: fixup fio_q_status style violations Commit d3b07186b1d4 broke lines in an unconventional manner, and not consistently. Fix those up. Signed-off-by: Jens Axboe --- engines/cpu.c | 4 ++-- engines/dev-dax.c | 4 ++-- engines/e4defrag.c | 4 ++-- engines/falloc.c | 7 ++++--- engines/filecreate.c | 4 ++-- engines/ftruncate.c | 7 ++++--- engines/guasi.c | 4 ++-- engines/libaio.c | 4 ++-- engines/libhdfs.c | 4 ++-- engines/libpmem.c | 4 ++-- engines/mmap.c | 4 ++-- engines/mtd.c | 4 ++-- engines/net.c | 9 +++++---- engines/null.c | 8 ++++---- engines/pmemblk.c | 4 ++-- engines/rados.c | 4 ++-- engines/rbd.c | 4 ++-- engines/rdma.c | 4 ++-- engines/sg.c | 10 +++++----- engines/skeleton_external.c | 4 ++-- engines/splice.c | 4 ++-- engines/sync.c | 21 ++++++++++----------- engines/windowsaio.c | 4 ++-- 23 files changed, 66 insertions(+), 64 deletions(-) diff --git a/engines/cpu.c b/engines/cpu.c index 37f9bbad..09872508 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 807d8505..0660bba5 100644 --- a/engines/dev-dax.c +++ b/engines/dev-dax.c @@ -182,8 +182,8 @@ done: 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 22d52312..8f71d02c 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 a1f6a242..6382569b 100644 --- a/engines/falloc.c +++ b/engines/falloc.c @@ -65,9 +65,10 @@ open_again: #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 fb3f3897..39a29502 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 4ff511ea..c7ad038c 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 4d332908..cb26802c 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 0e2263a7..f46b3314 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 37694faf..60001601 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 c3abe2a0..21ff4f66 100644 --- a/engines/libpmem.c +++ b/engines/libpmem.c @@ -457,8 +457,8 @@ done: 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 856547be..308b4665 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -177,8 +177,8 @@ done: 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 9e154836..b9f43164 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 8c25c4e5..ca6fb344 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 b1718e5c..4cc0102b 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 e2c55892..45f6fb65 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 f3795c57..c6aec730 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 cf7337f0..081b4a04 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 67c5aa7e..2569a8e3 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 56e5d18a..d4848bc5 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -236,9 +236,9 @@ re_read: 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 7e08afbb..21a36018 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 18403608..feb764fe 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 722320ef..3f36da82 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 2b932f71..13d7f194 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; -- 2.25.1