summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c06aa24)
Some time in the future we want a proper configure setup and only
install the supported io engines, for now install limited versions
that just complain on initialization.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
#include "fio.h"
#include "os.h"
#include "fio.h"
#include "os.h"
+#ifdef FIO_HAVE_LIBAIO
+
#define ev_to_iou(ev) (struct io_u *) ((unsigned long) (ev)->obj)
struct libaio_data {
#define ev_to_iou(ev) (struct io_u *) ((unsigned long) (ev)->obj)
struct libaio_data {
.event = fio_libaio_event,
.cleanup = fio_libaio_cleanup,
};
.event = fio_libaio_event,
.cleanup = fio_libaio_cleanup,
};
+
+#else /* FIO_HAVE_LIBAIO */
+
+/*
+ * When we have a proper configure system in place, we simply wont build
+ * and install this io engine. For now install a crippled version that
+ * just complains and fails to load.
+ */
+static int fio_libaio_init(struct thread_data fio_unused *td)
+{
+ fprintf(stderr, "fio: libaio not available\n");
+ return 1;
+}
+
+struct ioengine_ops ioengine = {
+ .name = "libaio",
+ .version = FIO_IOOPS_VERSION,
+ .init = fio_libaio_init,
+};
+
+#endif
#include "fio.h"
#include "os.h"
#include "fio.h"
#include "os.h"
+#ifdef FIO_HAVE_POSIXAIO
+
struct posixaio_data {
struct io_u **aio_events;
};
struct posixaio_data {
struct io_u **aio_events;
};
.event = fio_posixaio_event,
.cleanup = fio_posixaio_cleanup,
};
.event = fio_posixaio_event,
.cleanup = fio_posixaio_cleanup,
};
+
+#else /* FIO_HAVE_POSIXAIO */
+
+/*
+ * When we have a proper configure system in place, we simply wont build
+ * and install this io engine. For now install a crippled version that
+ * just complains and fails to load.
+ */
+static int fio_posixaio_init(struct thread_data fio_unused *td)
+{
+ fprintf(stderr, "fio: posixaio not available\n");
+ return 1;
+}
+
+struct ioengine_ops ioengine = {
+ .name = "posixaio",
+ .version = FIO_IOOPS_VERSION,
+ .init = fio_posixaio_init,
+};
+
+#endif
#include "fio.h"
#include "os.h"
#include "fio.h"
#include "os.h"
struct sgio_cmd {
unsigned char cdb[10];
int nr;
struct sgio_cmd {
unsigned char cdb[10];
int nr;
.cleanup = fio_sgio_cleanup,
.flags = FIO_SYNCIO | FIO_RAWIO,
};
.cleanup = fio_sgio_cleanup,
.flags = FIO_SYNCIO | FIO_RAWIO,
};
+
+#else /* FIO_HAVE_SGIO */
+
+/*
+ * When we have a proper configure system in place, we simply wont build
+ * and install this io engine. For now install a crippled version that
+ * just complains and fails to load.
+ */
+static int fio_sgio_init(struct thread_data fio_unused *td)
+{
+ fprintf(stderr, "fio: sgio not available\n");
+ return 1;
+}
+
+struct ioengine_ops ioengine = {
+ .name = "sgio",
+ .version = FIO_IOOPS_VERSION,
+ .init = fio_sgio_init,
+};
+
+#endif
#include "fio.h"
#include "os.h"
#include "fio.h"
#include "os.h"
+#ifdef FIO_HAVE_SPLICE
+
struct spliceio_data {
struct io_u *last_io_u;
int pipe[2];
struct spliceio_data {
struct io_u *last_io_u;
int pipe[2];
.cleanup = fio_spliceio_cleanup,
.flags = FIO_SYNCIO,
};
.cleanup = fio_spliceio_cleanup,
.flags = FIO_SYNCIO,
};
+
+#else /* FIO_HAVE_SPLICE */
+
+/*
+ * When we have a proper configure system in place, we simply wont build
+ * and install this io engine. For now install a crippled version that
+ * just complains and fails to load.
+ */
+static int fio_spliceio_init(struct thread_data fio_unused *td)
+{
+ fprintf(stderr, "fio: splice not available\n");
+ return 1;
+}
+
+struct ioengine_ops ioengine = {
+ .name = "splice",
+ .version = FIO_IOOPS_VERSION,
+ .init = fio_spliceio_init,
+};
+
+#endif
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "list.h"
#include "md5.h"
#include "list.h"
#include "md5.h"
static int str_mem_cb(void *, const char *);
static int str_verify_cb(void *, const char *);
static int str_lockmem_cb(void *, unsigned long *);
static int str_mem_cb(void *, const char *);
static int str_verify_cb(void *, const char *);
static int str_lockmem_cb(void *, unsigned long *);
static int str_prio_cb(void *, unsigned int *);
static int str_prioclass_cb(void *, unsigned int *);
static int str_prio_cb(void *, unsigned int *);
static int str_prioclass_cb(void *, unsigned int *);
static int str_exitall_cb(void);
static int str_cpumask_cb(void *, unsigned int *);
static int str_exitall_cb(void);
static int str_cpumask_cb(void *, unsigned int *);
static int str_prioclass_cb(void *data, unsigned int *val)
{
struct thread_data *td = data;
static int str_prioclass_cb(void *data, unsigned int *val)
{
struct thread_data *td = data;
td->ioprio |= *val;
return 0;
}
td->ioprio |= *val;
return 0;
}
static int str_exitall_cb(void)
{
static int str_exitall_cb(void)
{