client: don't setup shared mem area for just the frontend
[fio.git] / profile.h
CommitLineData
79d16311
JA
1#ifndef FIO_PROFILE_H
2#define FIO_PROFILE_H
3
4#include "flist.h"
5
7eb36574
JA
6/*
7 * Functions for overriding internal fio io_u functions
8 */
9struct prof_io_ops {
58c55ba0
JA
10 int (*td_init)(struct thread_data *);
11 void (*td_exit)(struct thread_data *);
12
7eb36574
JA
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
79d16311
JA
18struct profile_ops {
19 struct flist_head list;
20 char name[32];
e58eb86d 21 char desc[64];
79d16311
JA
22 int flags;
23
2363d8df
JA
24 /*
25 * Profile specific options
26 */
e2de69da 27 struct fio_option *options;
2363d8df
JA
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;
15dc1934 38
7eb36574 39 struct prof_io_ops *io_ops;
79d16311
JA
40};
41
07b3232d 42int register_profile(struct profile_ops *);
79d16311
JA
43void unregister_profile(struct profile_ops *);
44int load_profile(const char *);
15dc1934
JA
45struct profile_ops *find_profile(const char *);
46void profile_add_hooks(struct thread_data *);
79d16311 47
58c55ba0
JA
48int profile_td_init(struct thread_data *);
49void profile_td_exit(struct thread_data *);
50
79d16311 51#endif