X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=6370a562059a48b92360acab31202ef1e4d6d60f;hp=3010f6c146c4dbbcf0f9d191d0f44f22dfaa46d2;hb=2243dfc796a8a6e137893a57a77949df7657dd71;hpb=38ef9c90fbe4fddc209f94b277b49e78f7f6a424 diff --git a/ioengines.c b/ioengines.c index 3010f6c1..6370a562 100644 --- a/ioengines.c +++ b/ioengines.c @@ -220,7 +220,7 @@ int td_io_prep(struct thread_data *td, struct io_u *io_u) } int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max, - struct timespec *t) + const struct timespec *t) { int r = 0; @@ -321,7 +321,7 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) "support direct IO, or iomem_align= is bad.\n"); } - if (!td->io_ops->commit || ddir_trim(io_u->ddir)) { + if (!td->io_ops->commit || io_u->ddir == DDIR_TRIM) { io_u_mark_submit(td, 1); io_u_mark_complete(td, 1); } @@ -522,7 +522,8 @@ int td_io_get_file_size(struct thread_data *td, struct fio_file *f) return td->io_ops->get_file_size(td, f); } -static int do_sync_file_range(struct thread_data *td, struct fio_file *f) +static int do_sync_file_range(const struct thread_data *td, + struct fio_file *f) { off64_t offset, nbytes; @@ -535,7 +536,7 @@ static int do_sync_file_range(struct thread_data *td, struct fio_file *f) return sync_file_range(f->fd, offset, nbytes, td->o.sync_file_range); } -int do_io_u_sync(struct thread_data *td, struct io_u *io_u) +int do_io_u_sync(const struct thread_data *td, struct io_u *io_u) { int ret; @@ -561,7 +562,7 @@ int do_io_u_sync(struct thread_data *td, struct io_u *io_u) return ret; } -int do_io_u_trim(struct thread_data *td, struct io_u *io_u) +int do_io_u_trim(const struct thread_data *td, struct io_u *io_u) { #ifndef FIO_HAVE_TRIM io_u->error = EINVAL;