Skip to content

Commit

Permalink
engines: fixup fio_q_status style violations
Browse files Browse the repository at this point in the history
Commit d3b0718 broke lines in an unconventional manner, and
not consistently. Fix those up.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Apr 20, 2018
1 parent 4634d05 commit 2e4ef4f
Show file tree
Hide file tree
Showing 23 changed files with 66 additions and 64 deletions.
4 changes: 2 additions & 2 deletions engines/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions engines/dev-dax.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/e4defrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions engines/falloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/filecreate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 4 additions & 3 deletions engines/ftruncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions engines/guasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions engines/libaio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions engines/libhdfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/libpmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions engines/mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 5 additions & 4 deletions engines/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions engines/null.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions engines/pmemblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions engines/rados.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions engines/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/skeleton_external.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions engines/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
21 changes: 10 additions & 11 deletions engines/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions engines/windowsaio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2e4ef4f

Please sign in to comment.