Merge branch 'master' of ssh://git.kernel.dk/data/git/fio
authorJens Axboe <axboe@carl.home.kernel.dk>
Fri, 1 Feb 2008 20:51:29 +0000 (21:51 +0100)
committerJens Axboe <axboe@carl.home.kernel.dk>
Fri, 1 Feb 2008 20:51:29 +0000 (21:51 +0100)
1  2 
fio.h

diff --combined fio.h
index 4f2dc8f6cfd322421b8ba09cda67480d7b10e96e,572670ec0acb9792af4e808d69570ff8ea64c617..67f0badf8cb690d0b2940038157d19745b7075f0
--- 1/fio.h
--- 2/fio.h
+++ b/fio.h
@@@ -982,6 -982,7 +982,7 @@@ enum 
        FD_DEBUG_MAX,
  };
  
+ #ifdef FIO_INC_DEBUG
  struct debug_level {
        const char *name;
        unsigned long shift;
  extern struct debug_level debug_levels[];
  
  extern unsigned long fio_debug;
  #define dprint(type, str, args...)                            \
        do {                                                    \
                assert(type < FD_DEBUG_MAX);                    \
@@@ -1004,12 -1006,13 +1006,16 @@@ static inline void dprint_io_u(struct i
  
        dprint(FD_IO, "%s: io_u %p: off=%llu/len=%lu/ddir=%d", p, io_u,
                                        io_u->offset, io_u->buflen, io_u->ddir);
 -      if (f)
 -              dprint(FD_IO, "/%s", f->file_name);
 -      dprint(FD_IO, "\n");
 +      if (fio_debug & (1 << FD_IO)) {
 +              if (f)
 +                      log_info("/%s", f->file_name);
 +
 +              log_info("\n");
 +      }
  }
+ #else
+ #define dprint(type, str, args...)
+ #define dprint_io_u(io_u, p)
+ #endif
  
  #endif