projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/rand: get rid of unused MAX_SEED_BUCKETS
[fio.git]
/
engines
/
rbd.c
diff --git
a/engines/rbd.c
b/engines/rbd.c
index 336837e9d812bb0119308a62620a4cb2b1382003..2f25889ac877a09730bf6e037f5c9a3d7042dc64 100644
(file)
--- a/
engines/rbd.c
+++ b/
engines/rbd.c
@@
-173,7
+173,7
@@
static int _fio_rbd_connect(struct thread_data *td)
char *client_name = NULL;
/*
char *client_name = NULL;
/*
- * If we specify cluser name, the rados_create2
+ * If we specify clus
t
er name, the rados_create2
* will not assume 'client.'. name is considered
* as a full type.id namestr
*/
* will not assume 'client.'. name is considered
* as a full type.id namestr
*/
@@
-240,6
+240,17
@@
static int _fio_rbd_connect(struct thread_data *td)
goto failed_open;
}
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;
if (!_fio_rbd_setup_poll(rbd))
goto failed_poll;
@@
-622,7
+633,7
@@
static int fio_rbd_setup(struct thread_data *td)
/* taken from "net" engine. Pretend we deal with files,
* even if we do not have any ideas about files.
/* taken from "net" engine. Pretend we deal with files,
* even if we do not have any ideas about files.
- * The size of the RBD is set instead of a artificial file.
+ * The size of the RBD is set instead of a
n
artificial file.
*/
if (!td->files_index) {
add_file(td, td->o.filename ? : "rbd", 0, 0);
*/
if (!td->files_index) {
add_file(td, td->o.filename ? : "rbd", 0, 0);