From: Bart Van Assche Date: Wed, 18 Apr 2018 15:30:25 +0000 (-0700) Subject: gfapi: Make fio_gf_queue() set the I/O unit error status instead of returning -EINVAL X-Git-Tag: fio-3.7~23^2~2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d9bac1c6a8ca176fe8c1f342109e092f2de79419 gfapi: Make fio_gf_queue() set the I/O unit error status instead of returning -EINVAL This makes the gfapi I/O engine more uniform with other I/O engines. Signed-off-by: Bart Van Assche --- diff --git a/engines/glusterfs_sync.c b/engines/glusterfs_sync.c index 25d05b25..5a145bd8 100644 --- a/engines/glusterfs_sync.c +++ b/engines/glusterfs_sync.c @@ -47,7 +47,8 @@ static int fio_gf_queue(struct thread_data *td, struct io_u *io_u) ret = glfs_fdatasync(g->fd); else { log_err("unsupported operation.\n"); - return -EINVAL; + io_u->error = EINVAL; + return FIO_Q_COMPLETED; } dprint(FD_FILE, "fio len %lu ret %d\n", io_u->xfer_buflen, ret); if (io_u->file && ret >= 0 && ddir_rw(io_u->ddir))