engines/rbd: fix compile without blkin support
authorJens Axboe <axboe@fb.com>
Tue, 2 Aug 2016 21:23:43 +0000 (15:23 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 2 Aug 2016 21:23:43 +0000 (15:23 -0600)
If we don't have rbd-blkin support, compile fails with:

engines/rbd.c:21:26: error: field ‘info’ has incomplete type
  struct blkin_trace_info info;
                          ^~~~
Makefile:313: recipe for target 'engines/rbd.o' failed

Hide 'info' behind the ifdef.

Fixes: a4c4c3460bd5 ("Add support for blkin tracing in rbd engine")
Signed-off-by: Jens Axboe <axboe@fb.com>
engines/rbd.c

index b319315fc73e1e10d43a177651187666e9e8e731..5e17fbe73a7fab5cc1b04431c3df7965d76acd01 100644 (file)
@@ -18,7 +18,9 @@ struct fio_rbd_iou {
        rbd_completion_t completion;
        int io_seen;
        int io_complete;
+#ifdef CONFIG_RBD_BLKIN
        struct blkin_trace_info info;
+#endif
 };
 
 struct rbd_data {