int ret = *retptr;
if (ret < 0 || td->error) {
- int err;
+ int err = td->error;
+ enum error_type_bit eb;
if (ret < 0)
err = -ret;
- else
- err = td->error;
- if (!(td->o.continue_on_error & td_error_type(ddir, err)))
+ eb = td_error_type(ddir, err);
+ if (!(td->o.continue_on_error & (1 << eb)))
return 1;
- if (td_non_fatal_error(err)) {
+ if (td_non_fatal_error(td, eb, err)) {
/*
* Continue with the I/Os in case of
* a non fatal error.
struct io_u *io_u;
unsigned int max_bs, min_write;
int cl_align, i, max_units;
+ int data_xfer = 1;
char *p;
max_units = td->o.iodepth;
td->orig_buffer_size = (unsigned long long) max_bs
* (unsigned long long) max_units;
+ 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) {
unsigned long bs;
return 1;
}
- if (allocate_io_mem(td))
+ if (data_xfer && allocate_io_mem(td))
return 1;
if (td->o.odirect || td->o.mem_align ||
INIT_FLIST_HEAD(&io_u->list);
dprint(FD_MEM, "io_u alloc %p, index %u\n", io_u, i);
- if (!(td->io_ops->flags & FIO_NOIO)) {
+ if (data_xfer) {
io_u->buf = p;
dprint(FD_MEM, "io_u %p, mem %p\n", io_u, io_u->buf);
set_sig_handlers();
- if (!terse_output) {
+ if (output_format == FIO_OUTPUT_NORMAL) {
log_info("Starting ");
if (nr_thread)
log_info("%d thread%s", nr_thread,