Skip to content

Commit

Permalink
Merge branch 'wip-lmy-rados' of https://github.com/liangmingyuanneo/fio
Browse files Browse the repository at this point in the history
* 'wip-lmy-rados' of https://github.com/liangmingyuanneo/fio:
  engines/ceph: add option for setting config file path
  • Loading branch information
axboe committed May 29, 2022
2 parents cb8dcaf + 873db85 commit e1aeff3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions HOWTO.rst
Expand Up @@ -2495,6 +2495,11 @@ with the caveat that when used on the command line, they must come after the
the full *type.id* string. If no type. prefix is given, fio will add
'client.' by default.

.. option:: conf=str : [rados]

Specifies the configuration path of ceph cluster, so conf file does not
have to be /etc/ceph/ceph.conf.

.. option:: busy_poll=bool : [rbd,rados]

Poll store instead of waiting for completion. Usually this provides better
Expand Down
13 changes: 12 additions & 1 deletion engines/rados.c
Expand Up @@ -37,6 +37,7 @@ struct rados_options {
char *cluster_name;
char *pool_name;
char *client_name;
char *conf;
int busy_poll;
int touch_objects;
};
Expand Down Expand Up @@ -69,6 +70,16 @@ static struct fio_option options[] = {
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_RBD,
},
{
.name = "conf",
.lname = "ceph configuration file path",
.type = FIO_OPT_STR_STORE,
.help = "Path of the ceph configuration file",
.off1 = offsetof(struct rados_options, conf),
.def = "/etc/ceph/ceph.conf",
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_RBD,
},
{
.name = "busy_poll",
.lname = "busy poll mode",
Expand Down Expand Up @@ -184,7 +195,7 @@ static int _fio_rados_connect(struct thread_data *td)
goto failed_early;
}

r = rados_conf_read_file(rados->cluster, NULL);
r = rados_conf_read_file(rados->cluster, o->conf);
if (r < 0) {
log_err("rados_conf_read_file failed.\n");
goto failed_early;
Expand Down
1 change: 1 addition & 0 deletions examples/rados.fio
Expand Up @@ -14,6 +14,7 @@
ioengine=rados
clientname=admin
pool=rados
conf=/etc/ceph/ceph.conf
busy_poll=0
rw=randwrite
bs=4k
Expand Down
4 changes: 4 additions & 0 deletions fio.1
Expand Up @@ -2244,6 +2244,10 @@ Ceph cluster. If the \fBclustername\fR is specified, the \fBclientname\fR shall
the full *type.id* string. If no type. prefix is given, fio will add 'client.'
by default.
.TP
.BI (rados)conf \fR=\fPstr
Specifies the configuration path of ceph cluster, so conf file does not
have to be /etc/ceph/ceph.conf.
.TP
.BI (rbd,rados)busy_poll \fR=\fPbool
Poll store instead of waiting for completion. Usually this provides better
throughput at cost of higher(up to 100%) CPU utilization.
Expand Down

0 comments on commit e1aeff3

Please sign in to comment.