/*
* Sync engine uses engine_data to store last offset
*/
-#define LAST_POS(f) ((f)->engine_data)
+#define LAST_POS(f) ((f)->engine_pos)
struct syncio_data {
struct iovec *iovecs;
enum fio_ddir last_ddir;
};
-#ifdef CONFIG_PWRITEV2
+#ifdef FIO_HAVE_PWRITEV2
struct psyncv2_options {
void *pad;
unsigned int hipri;
#ifdef CONFIG_PWRITEV
static int fio_pvsyncio_queue(struct thread_data *td, struct io_u *io_u)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
struct iovec *iov = &sd->iovecs[0];
struct fio_file *f = io_u->file;
int ret;
}
#endif
-#ifdef CONFIG_PWRITEV2
+#ifdef FIO_HAVE_PWRITEV2
static int fio_pvsyncio2_queue(struct thread_data *td, struct io_u *io_u)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
struct psyncv2_options *o = td->eo;
struct iovec *iov = &sd->iovecs[0];
struct fio_file *f = io_u->file;
unsigned int max,
const struct timespec fio_unused *t)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
int ret;
if (min) {
static struct io_u *fio_vsyncio_event(struct thread_data *td, int event)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
return sd->io_us[event];
}
static int fio_vsyncio_append(struct thread_data *td, struct io_u *io_u)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
if (ddir_sync(io_u->ddir))
return 0;
static int fio_vsyncio_queue(struct thread_data *td, struct io_u *io_u)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
fio_ro_check(td, io_u);
*/
static int fio_vsyncio_end(struct thread_data *td, ssize_t bytes)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
struct io_u *io_u;
unsigned int i;
int err;
static int fio_vsyncio_commit(struct thread_data *td)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
struct fio_file *f;
ssize_t ret;
sd->iovecs = malloc(td->o.iodepth * sizeof(struct iovec));
sd->io_us = malloc(td->o.iodepth * sizeof(struct io_u *));
- td->io_ops->data = sd;
+ td->io_ops_data = sd;
return 0;
}
static void fio_vsyncio_cleanup(struct thread_data *td)
{
- struct syncio_data *sd = td->io_ops->data;
+ struct syncio_data *sd = td->io_ops_data;
if (sd) {
free(sd->iovecs);
};
#endif
-#ifdef CONFIG_PWRITEV2
+#ifdef FIO_HAVE_PWRITEV2
static struct ioengine_ops ioengine_pvrw2 = {
.name = "pvsync2",
.version = FIO_IOOPS_VERSION,
#ifdef CONFIG_PWRITEV
register_ioengine(&ioengine_pvrw);
#endif
-#ifdef CONFIG_PWRITEV2
+#ifdef FIO_HAVE_PWRITEV2
register_ioengine(&ioengine_pvrw2);
#endif
}
#ifdef CONFIG_PWRITEV
unregister_ioengine(&ioengine_pvrw);
#endif
-#ifdef CONFIG_PWRITEV2
+#ifdef FIO_HAVE_PWRITEV2
unregister_ioengine(&ioengine_pvrw2);
#endif
}