X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=iolog.h;h=c35ce1e694511b2eb08300e8b3744410d3f7a298;hp=2b646866007f89c3ea5cb3112ac0519f205b54a5;hb=8c029376bbe6d8a6bcb01c3ef7d545720aca3868;hpb=5995a6a46a4c697a6c68c02da3c7c46c0cdea23f diff --git a/iolog.h b/iolog.h index 2b646866..c35ce1e6 100644 --- a/iolog.h +++ b/iolog.h @@ -32,6 +32,12 @@ struct io_log { struct io_sample *log; }; +enum { + IP_F_ONRB = 1, + IP_F_ONLIST = 2, + IP_F_TRIMMED = 4, +}; + /* * When logging io actions, this matches a single sent io_u */ @@ -40,12 +46,14 @@ struct io_piece { struct rb_node rb_node; struct flist_head list; }; + struct flist_head trim_list; union { int fileno; struct fio_file *file; }; unsigned long long offset; unsigned long len; + unsigned int flags; enum fio_ddir ddir; union { unsigned long delay; @@ -75,6 +83,8 @@ extern void write_iolog_close(struct thread_data *); /* * Logging */ +extern void add_lat_sample(struct thread_data *, enum fio_ddir, unsigned long, + unsigned int); extern void add_clat_sample(struct thread_data *, enum fio_ddir, unsigned long, unsigned int); extern void add_slat_sample(struct thread_data *, enum fio_ddir, unsigned long, @@ -93,4 +103,10 @@ extern struct io_log *agg_io_log[2]; extern int write_bw_log; extern void add_agg_sample(unsigned long, enum fio_ddir, unsigned int); +static inline void init_ipo(struct io_piece *ipo) +{ + memset(ipo, 0, sizeof(*ipo)); + INIT_FLIST_HEAD(&ipo->trim_list); +} + #endif