X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=a87175a23aa74999999ec18a64edf823e84aff90;hp=b43374e7afebb03a63d059fd5f09a36d582e67ba;hb=7477673323a943b99ea203bb9434661d13a0159c;hpb=6eaf09d6e9ca1f8accb057cdb18620b7e53ae33f diff --git a/ioengines.c b/ioengines.c index b43374e7..a87175a2 100644 --- a/ioengines.c +++ b/ioengines.c @@ -104,7 +104,9 @@ static struct ioengine_ops *dlopen_ioengine(struct thread_data *td, * Unlike the included modules, external engines should have a * non-static ioengine structure that we can reference. */ - ops = dlsym(dlhandle, "ioengine"); + ops = dlsym(dlhandle, engine_lib); + if (!ops) + ops = dlsym(dlhandle, "ioengine"); if (!ops) { td_vmsg(td, -1, dlerror(), "dlsym"); dlclose(dlhandle); @@ -501,7 +503,7 @@ int do_io_u_sync(struct thread_data *td, struct io_u *io_u) if (io_u->ddir == DDIR_SYNC) { ret = fsync(io_u->file->fd); } else if (io_u->ddir == DDIR_DATASYNC) { -#ifdef FIO_HAVE_FDATASYNC +#ifdef CONFIG_FDATASYNC ret = fdatasync(io_u->file->fd); #else ret = io_u->xfer_buflen;