projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Link in known io engines
[fio.git]
/
engines
/
fio-engine-posixaio.c
diff --git
a/engines/fio-engine-posixaio.c
b/engines/fio-engine-posixaio.c
index 401cd866ba549ee193098f3af54998c6e6aef2fd..ef4d78ebe8a58c03465eb33cdc58aa7f90b52d7c 100644
(file)
--- a/
engines/fio-engine-posixaio.c
+++ b/
engines/fio-engine-posixaio.c
@@
-7,8
+7,9
@@
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
-#include "fio.h"
-#include "os.h"
+
+#include "../fio.h"
+#include "../os.h"
#ifdef FIO_HAVE_POSIXAIO
#ifdef FIO_HAVE_POSIXAIO
@@
-171,13
+172,15
@@
static int fio_posixaio_init(struct thread_data *td)
{
struct posixaio_data *pd = malloc(sizeof(*pd));
{
struct posixaio_data *pd = malloc(sizeof(*pd));
+ memset(pd, 0, sizeof(*pd));
pd->aio_events = malloc(td->iodepth * sizeof(struct io_u *));
pd->aio_events = malloc(td->iodepth * sizeof(struct io_u *));
+ memset(pd->aio_events, 0, td->iodepth * sizeof(struct io_u *));
td->io_ops->data = pd;
return 0;
}
td->io_ops->data = pd;
return 0;
}
-struct ioengine_ops ioengine = {
+st
atic st
ruct ioengine_ops ioengine = {
.name = "posixaio",
.version = FIO_IOOPS_VERSION,
.init = fio_posixaio_init,
.name = "posixaio",
.version = FIO_IOOPS_VERSION,
.init = fio_posixaio_init,
@@
-202,10
+205,20
@@
static int fio_posixaio_init(struct thread_data fio_unused *td)
return 1;
}
return 1;
}
-struct ioengine_ops ioengine = {
+st
atic st
ruct ioengine_ops ioengine = {
.name = "posixaio",
.version = FIO_IOOPS_VERSION,
.init = fio_posixaio_init,
};
#endif
.name = "posixaio",
.version = FIO_IOOPS_VERSION,
.init = fio_posixaio_init,
};
#endif
+
+static void fio_init fio_posixaio_register(void)
+{
+ register_ioengine(&ioengine);
+}
+
+static void fio_exit fio_posixaio_unregister(void)
+{
+ unregister_ioengine(&ioengine);
+}