fi
echo "Rados Block Device engine $rbd"
+##########################################
+# check for rbd_invaidate_cache()
+rbd_inval="no"
+if test "$rbd" = "yes"; then
+cat > $TMPC << EOF
+#include <rbd/librbd.h>
+
+int main(int argc, char **argv)
+{
+ rbd_image_t image;
+
+ return rbd_invalidate_cache(image);
+}
+EOF
+if compile_prog "" "-lrbd -lrados" "rbd"; then
+ rbd_inval="yes"
+fi
+echo "rbd_invalidate_cache $rbd_inval"
+fi
+
##########################################
# Check whether we have setvbuf
setvbuf="no"
if test "$rbd" = "yes" ; then
output_sym "CONFIG_RBD"
fi
+if test "$rbd_inval" = "yes" ; then
+ output_sym "CONFIG_RBD_INVAL"
+fi
if test "$setvbuf" = "yes" ; then
output_sym "CONFIG_SETVBUF"
fi
static int fio_rbd_invalidate(struct thread_data *td, struct fio_file *f)
{
+#if defined(CONFIG_RBD_INVAL)
+ struct rbd_data *rbd_data = td->io_ops->data;
+
+ return rbd_invalidate_cache(rbd_data->image);
+#else
return 0;
+#endif
}
static void fio_rbd_io_u_free(struct thread_data *td, struct io_u *io_u)