projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7914c61
)
engines/rbd: add support for "direct=1" option
author
Jason Dillaman
<dillaman@redhat.com>
Wed, 2 Dec 2020 18:54:58 +0000
(13:54 -0500)
committer
Jason Dillaman
<dillaman@redhat.com>
Wed, 2 Dec 2020 18:54:58 +0000
(13:54 -0500)
When direct IO is enabled, the librbd in-memory cache will be
automatically disabled.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
engines/rbd.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/rbd.c
b/engines/rbd.c
index 268b6ebdffad2b71e4da565ed90867e76f90947a..336837e9d812bb0119308a62620a4cb2b1382003 100644
(file)
--- a/
engines/rbd.c
+++ b/
engines/rbd.c
@@
-227,6
+227,13
@@
static int _fio_rbd_connect(struct thread_data *td)
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");