projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
t/axmap: add regression test for overlap case resulting in 0 settable bits
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index 6ffd27f10ec9e303b16a7e00ffefec000cab67d2..433da604ae4af03daf9fc8b8d5a81b2097ed0362 100644
(file)
--- 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);
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");
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");
}
"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);
}
io_u_mark_submit(td, 1);
io_u_mark_complete(td, 1);
}
@@
-431,6
+431,14
@@
void td_io_commit(struct thread_data *td)
int td_io_open_file(struct thread_data *td, struct fio_file *f)
{
int td_io_open_file(struct thread_data *td, struct fio_file *f)
{
+ if (fio_file_closing(f)) {
+ /*
+ * Open translates to undo closing.
+ */
+ fio_file_clear_closing(f);
+ get_file(f);
+ return 0;
+ }
assert(!fio_file_open(f));
assert(f->fd == -1);
assert(td->io_ops->open_file);
assert(!fio_file_open(f));
assert(f->fd == -1);
assert(td->io_ops->open_file);
@@
-540,11
+548,6
@@
int td_io_close_file(struct thread_data *td, struct fio_file *f)
*/
fio_file_set_closing(f);
*/
fio_file_set_closing(f);
- disk_util_dec(f->du);
-
- if (td->o.file_lock_mode != FILE_LOCK_NONE)
- unlock_file_all(td, f);
-
return put_file(td, f);
}
return put_file(td, f);
}
@@
-574,6
+577,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;
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;
struct ioengine_ops *io_ops;
char *sep;
int ret = 1;
@@
-592,7
+596,10
@@
int fio_show_ioengine_help(const char *engine)
sep++;
}
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;
if (!io_ops) {
log_info("IO engine %s not found\n", engine);
return 1;
@@
-603,5
+610,6
@@
int fio_show_ioengine_help(const char *engine)
else
log_info("IO engine %s has no options\n", io_ops->name);
else
log_info("IO engine %s has no options\n", io_ops->name);
+ free_ioengine(&td);
return ret;
}
return ret;
}