X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengine.h;h=18496c3afc860aab452d9a1ce4dcba8344fd7b94;hp=2caece72c644e4e4f144715f586e73bcb6b5ffac;hb=c592b9fe12d4739d99d5bece517e304804876df6;hpb=7c9b1bce094d58c374b086bbb780c08265623ea4 diff --git a/ioengine.h b/ioengine.h index 2caece72..18496c3a 100644 --- a/ioengine.h +++ b/ioengine.h @@ -149,4 +149,23 @@ extern void io_u_fill_buffer(struct thread_data *td, struct io_u *, unsigned int void io_u_mark_complete(struct thread_data *, unsigned int); void io_u_mark_submit(struct thread_data *, unsigned int); +#ifdef FIO_INC_DEBUG +static inline void dprint_io_u(struct io_u *io_u, const char *p) +{ + struct fio_file *f = io_u->file; + + dprint(FD_IO, "%s: io_u %p: off=%llu/len=%lu/ddir=%d", p, io_u, + (unsigned long long) io_u->offset, + io_u->buflen, io_u->ddir); + if (fio_debug & (1 << FD_IO)) { + if (f) + log_info("/%s", f->file_name); + + log_info("\n"); + } +} +#else +#define dprint_io_u(io_u, p) +#endif + #endif