From: Dmitry Monakhov Date: Tue, 25 Sep 2012 10:12:36 +0000 (+0200) Subject: backend: fix data direction flow check X-Git-Tag: fio-2.0.10~15 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=88045e04fdd81dbb584d70f9faeb1f6498a85159;p=fio.git backend: fix data direction flow check This patch fix regression caused SIGSEGV in case of writeonly or readonly mode, caused by commit 59d8d0f5. Signed-off-by: Dmitry Monakhov Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index 88623bea..c31d22af 100644 --- a/backend.c +++ b/backend.c @@ -812,7 +812,7 @@ static int init_io_u(struct thread_data *td) td->orig_buffer_size = (unsigned long long) max_bs * (unsigned long long) max_units; - if ((td->io_ops->flags & FIO_NOIO) || !td_rw(td)) + if ((td->io_ops->flags & FIO_NOIO) || !(td_read(td) || td_write(td))) data_xfer = 0; if (td->o.mem_type == MEM_SHMHUGE || td->o.mem_type == MEM_MMAPHUGE) {