summaryrefslogtreecommitdiff
path: root/profile.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2010-03-08 13:58:49 +0100
committerJens Axboe <jens.axboe@oracle.com>2010-03-08 13:58:49 +0100
commit7eb36574da703ebdfac414d7428712320f552a96 (patch)
treee78b91f0e3ffe2fb5ad41390982d2a141654463f /profile.h
parenta0741cbb98a0399d26e90cb05604bbfb20a45bc6 (diff)
downloadfio-7eb36574da703ebdfac414d7428712320f552a96.tar.gz
Make profile io op overrides a dedicated structure
Also add a 'get_next_file' hook while at it. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/profile.h b/profile.h
index 3bae5002..a54f0724 100644
--- a/profile.h
+++ b/profile.h
@@ -3,6 +3,15 @@
#include "flist.h"
+/*
+ * Functions for overriding internal fio io_u functions
+ */
+struct prof_io_ops {
+ int (*fill_io_u_off)(struct thread_data *, struct io_u *);
+ int (*fill_io_u_size)(struct thread_data *, struct io_u *);
+ struct fio_file *(*get_next_file)(struct thread_data *);
+};
+
struct profile_ops {
struct flist_head list;
char name[32];
@@ -24,11 +33,7 @@ struct profile_ops {
*/
const char **cmdline;
- /*
- * Functions for overriding internal fio io_u functions
- */
- int (*fill_io_u_off)(struct thread_data *, struct io_u *);
- int (*fill_io_u_size)(struct thread_data *, struct io_u *);
+ struct prof_io_ops *io_ops;
};
int register_profile(struct profile_ops *);