goto failed_shutdown;
}
+ if (td->o.odirect) {
+ r = rados_conf_set(rbd->cluster, "rbd_cache", "false");
+ if (r < 0) {
+ log_info("failed to disable RBD in-memory cache\n");
+ }
+ }
+
r = rbd_open(rbd->io_ctx, o->rbd_name, &rbd->image, NULL /*snap */ );
if (r < 0) {
log_err("rbd_open failed.\n");
goto failed_open;
}
+ if (!td->o.odirect) {
+ /*
+ * ensure cache enables writeback/around mode unless explicitly
+ * configured for writethrough mode
+ */
+ r = rbd_flush(rbd->image);
+ if (r < 0) {
+ log_info("rbd: failed to issue initial flush\n");
+ }
+ }
+
if (!_fio_rbd_setup_poll(rbd))
goto failed_poll;