From 88045e04fdd81dbb584d70f9faeb1f6498a85159 Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Tue, 25 Sep 2012 12:12:36 +0200 Subject: [PATCH] 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 --- backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.25.1