X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=e5fbcd432ce78fb847148383ad03016966aab88d;hp=6ffd27f10ec9e303b16a7e00ffefec000cab67d2;hb=a871240086ca6bdc52f79d7459ed283c5a359299;hpb=4634d057febe9b4d7028e6f02963a8fd8996ac6a diff --git a/ioengines.c b/ioengines.c index 6ffd27f1..e5fbcd43 100644 --- a/ioengines.c +++ b/ioengines.c @@ -279,7 +279,7 @@ out: enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u) { const enum fio_ddir ddir = acct_ddir(io_u); - unsigned long buflen = io_u->xfer_buflen; + unsigned long long buflen = io_u->xfer_buflen; enum fio_q_status ret; dprint_io_u(io_u, "queue"); @@ -350,7 +350,7 @@ enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u) "invalid block size. Try setting direct=0.\n"); } - if (!td->io_ops->commit || io_u->ddir == DDIR_TRIM) { + if (!td->io_ops->commit) { io_u_mark_submit(td, 1); io_u_mark_complete(td, 1); } @@ -574,6 +574,7 @@ int td_io_get_file_size(struct thread_data *td, struct fio_file *f) int fio_show_ioengine_help(const char *engine) { struct flist_head *entry; + struct thread_data td; struct ioengine_ops *io_ops; char *sep; int ret = 1; @@ -592,7 +593,10 @@ int fio_show_ioengine_help(const char *engine) sep++; } - io_ops = __load_ioengine(engine); + memset(&td, 0, sizeof(struct thread_data)); + td.o.ioengine = (char *)engine; + io_ops = load_ioengine(&td); + if (!io_ops) { log_info("IO engine %s not found\n", engine); return 1; @@ -603,5 +607,6 @@ int fio_show_ioengine_help(const char *engine) else log_info("IO engine %s has no options\n", io_ops->name); + free_ioengine(&td); return ret; }