X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fsolarisaio.c;h=906a154a2eee3093274f3537cdf4bf40bcf1751c;hb=716050f2a0b858835d7836ad74e8b680973e08e8;hp=a48ec41825b67ceae574682ba73cc545bcd9156e;hpb=9d7dfdaef1ed5f6227fd31117d310ac15ae63152;p=fio.git diff --git a/engines/solarisaio.c b/engines/solarisaio.c index a48ec418..906a154a 100644 --- a/engines/solarisaio.c +++ b/engines/solarisaio.c @@ -62,7 +62,7 @@ static void wait_for_event(struct timeval *tv) io_u->resid = io_u->xfer_buflen - io_u->resultp.aio_return; io_u->error = 0; } else - io_u->error = io_u->resultp.aio_return; + io_u->error = io_u->resultp.aio_errno; /* * For SIGIO, we need a write barrier between the two, so that @@ -126,6 +126,15 @@ static int fio_solarisaio_queue(struct thread_data fio_unused *td, return FIO_Q_COMPLETED; } + if (io_u->ddir == DDIR_DATASYNC) { + if (sd->nr) + return FIO_Q_BUSY; + if (fdatasync(f->fd) < 0) + io_u->error = errno; + + return FIO_Q_COMPLETED; + } + if (sd->nr == sd->max_depth) return FIO_Q_BUSY; @@ -225,7 +234,7 @@ static struct ioengine_ops ioengine = { */ static int fio_solarisaio_init(struct thread_data fio_unused *td) { - fprintf(stderr, "fio: solarisaio not available\n"); + log_err("fio: solarisaio not available\n"); return 1; }