profile.h revision 58c55ba02aca24ed30beb343fcb1dc3df4667389
1#ifndef FIO_PROFILE_H 2#define FIO_PROFILE_H 3 4#include "flist.h" 5 6/* 7 * Functions for overriding internal fio io_u functions 8 */ 9struct prof_io_ops { 10 int (*td_init)(struct thread_data *); 11 void (*td_exit)(struct thread_data *); 12 13 int (*fill_io_u_off)(struct thread_data *, struct io_u *); 14 int (*fill_io_u_size)(struct thread_data *, struct io_u *); 15 struct fio_file *(*get_next_file)(struct thread_data *); 16}; 17 18struct profile_ops { 19 struct flist_head list; 20 char name[32]; 21 char desc[64]; 22 int flags; 23 24 /* 25 * Profile specific options 26 */ 27 struct fio_option *options; 28 29 /* 30 * Called after parsing options, to prepare 'cmdline' 31 */ 32 void (*prep_cmd)(void); 33 34 /* 35 * The complete command line 36 */ 37 const char **cmdline; 38 39 struct prof_io_ops *io_ops; 40}; 41 42int register_profile(struct profile_ops *); 43void unregister_profile(struct profile_ops *); 44int load_profile(const char *); 45struct profile_ops *find_profile(const char *); 46void profile_add_hooks(struct thread_data *); 47 48int profile_td_init(struct thread_data *); 49void profile_td_exit(struct thread_data *); 50 51#endif 52