From: Jens Axboe Date: Mon, 14 Jan 2013 18:22:15 +0000 (+0100) Subject: fusion-aw: fixes X-Git-Tag: fio-2.0.14~120 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c11a9ddfb9a53f9faa78b72fc79be2f46addc8aa fusion-aw: fixes Signed-off-by: Jens Axboe --- diff --git a/configure b/configure index 27cfb4d1..c9932b57 100755 --- a/configure +++ b/configure @@ -650,7 +650,7 @@ int main(int argc, char **argv) return vsl_vectored_write(0, &iov, 0, O_ATOMIC); } EOF -if compile_prog "" "" "fusion-aw"; then +if compile_prog "" "-lvsldpexp" "fusion-aw"; then fusion_aw="yes" fi echo "Fusion-io atomic engine $fusion_aw" diff --git a/engines/fusion-aw.c b/engines/fusion-aw.c index 42135924..20d13e05 100644 --- a/engines/fusion-aw.c +++ b/engines/fusion-aw.c @@ -29,7 +29,7 @@ #define SECTOR_SHIFT 9 #define SECTOR_SIZE (1U<file->file_data; + struct acs_engine_data *d = + (struct acs_engine_data *) io_u->file->engine_data; if (io_u->ddir != DDIR_WRITE) { td_vmsg(td, -EIO, "only writes supported", "io_u->ddir"); @@ -99,7 +100,7 @@ out: static int open_file(struct thread_data *td, struct fio_file *f) { int rc; - struct acs_file_data *d = NULL; + struct acs_engine_data *d = NULL; d = malloc(sizeof(*d)); if (!d) { @@ -107,7 +108,7 @@ static int open_file(struct thread_data *td, struct fio_file *f) rc = -ENOMEM; goto error; } - f->file_data = d; + f->engine_data = (uintptr_t) d; rc = generic_open_file(td, f); @@ -116,7 +117,7 @@ out: error: f->fd = -1; - f->file_data = NULL; + f->engine_data = 0; if (d) free(d); @@ -125,9 +126,9 @@ error: static int close_file(struct thread_data *td, struct fio_file *f) { - if (f->file_data) { - free(f->file_data); - f->file_data = NULL; + if (f->engine_data) { + free((void *) f->engine_data); + f->engine_data = 0; } return generic_close_file(td, f);