projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't malloc/memcpy ioengine_ops on td initialization
[fio.git]
/
engines
/
rbd.c
diff --git
a/engines/rbd.c
b/engines/rbd.c
index 1a0d48a6bc5e0c3906fea4f6de6c264f606ff7bc..7a109eedf3d62ed1978cecd9fe74e0799962bafb 100644
(file)
--- a/
engines/rbd.c
+++ b/
engines/rbd.c
@@
-91,7
+91,7
@@
static int _fio_setup_rbd_data(struct thread_data *td,
{
struct rbd_data *rbd;
{
struct rbd_data *rbd;
- if (td->io_ops
->
data)
+ if (td->io_ops
_
data)
return 0;
rbd = calloc(1, sizeof(struct rbd_data));
return 0;
rbd = calloc(1, sizeof(struct rbd_data));
@@
-123,7
+123,7
@@
failed:
static int _fio_rbd_connect(struct thread_data *td)
{
static int _fio_rbd_connect(struct thread_data *td)
{
- struct rbd_data *rbd = td->io_ops
->
data;
+ struct rbd_data *rbd = td->io_ops
_
data;
struct rbd_options *o = td->eo;
int r;
struct rbd_options *o = td->eo;
int r;
@@
-231,7
+231,7
@@
static void _fio_rbd_finish_aiocb(rbd_completion_t comp, void *data)
static struct io_u *fio_rbd_event(struct thread_data *td, int event)
{
static struct io_u *fio_rbd_event(struct thread_data *td, int event)
{
- struct rbd_data *rbd = td->io_ops
->
data;
+ struct rbd_data *rbd = td->io_ops
_
data;
return rbd->aio_events[event];
}
return rbd->aio_events[event];
}
@@
-287,7
+287,7
@@
static int rbd_io_u_cmp(const void *p1, const void *p2)
static int rbd_iter_events(struct thread_data *td, unsigned int *events,
unsigned int min_evts, int wait)
{
static int rbd_iter_events(struct thread_data *td, unsigned int *events,
unsigned int min_evts, int wait)
{
- struct rbd_data *rbd = td->io_ops
->
data;
+ struct rbd_data *rbd = td->io_ops
_
data;
unsigned int this_events = 0;
struct io_u *io_u;
int i, sidx;
unsigned int this_events = 0;
struct io_u *io_u;
int i, sidx;
@@
-366,7
+366,7
@@
static int fio_rbd_getevents(struct thread_data *td, unsigned int min,
static int fio_rbd_queue(struct thread_data *td, struct io_u *io_u)
{
static int fio_rbd_queue(struct thread_data *td, struct io_u *io_u)
{
- struct rbd_data *rbd = td->io_ops
->
data;
+ struct rbd_data *rbd = td->io_ops
_
data;
struct fio_rbd_iou *fri = io_u->engine_data;
int r = -1;
struct fio_rbd_iou *fri = io_u->engine_data;
int r = -1;
@@
-444,7
+444,7
@@
failed:
static void fio_rbd_cleanup(struct thread_data *td)
{
static void fio_rbd_cleanup(struct thread_data *td)
{
- struct rbd_data *rbd = td->io_ops
->
data;
+ struct rbd_data *rbd = td->io_ops
_
data;
if (rbd) {
_fio_rbd_disconnect(rbd);
if (rbd) {
_fio_rbd_disconnect(rbd);
@@
-472,7
+472,7
@@
static int fio_rbd_setup(struct thread_data *td)
log_err("fio_setup_rbd_data failed.\n");
goto cleanup;
}
log_err("fio_setup_rbd_data failed.\n");
goto cleanup;
}
- td->io_ops
->
data = rbd;
+ td->io_ops
_
data = rbd;
/* librbd does not allow us to run first in the main thread and later
* in a fork child. It needs to be the same process context all the
/* librbd does not allow us to run first in the main thread and later
* in a fork child. It needs to be the same process context all the
@@
-531,7
+531,7
@@
static int fio_rbd_open(struct thread_data *td, struct fio_file *f)
static int fio_rbd_invalidate(struct thread_data *td, struct fio_file *f)
{
#if defined(CONFIG_RBD_INVAL)
static int fio_rbd_invalidate(struct thread_data *td, struct fio_file *f)
{
#if defined(CONFIG_RBD_INVAL)
- struct rbd_data *rbd = td->io_ops
->
data;
+ struct rbd_data *rbd = td->io_ops
_
data;
return rbd_invalidate_cache(rbd->image);
#else
return rbd_invalidate_cache(rbd->image);
#else