#include "../lib/memalign.h"
#include "../lib/fls.h"
#include "../lib/roundup.h"
+#include "../verify.h"
#ifdef ARCH_HAVE_IOURING
md_size += td->o.mem_align - page_size;
if (td->o.mem_type == MEM_MALLOC) {
ld->md_buf = malloc(md_size);
- if (!ld->md_buf)
+ if (!ld->md_buf) {
+ free(ld);
return 1;
+ }
} else {
log_err("fio: Only iomem=malloc or mem=malloc is supported\n");
+ free(ld);
return 1;
}
}
td->o.zone_mode == ZONE_MODE_ZBD)
td->io_ops->flags |= FIO_ASYNCIO_SYNC_TRIM;
else
- ld->dsm = calloc(ld->iodepth, sizeof(*ld->dsm));
+ ld->dsm = calloc(td->o.iodepth, sizeof(*ld->dsm));
return 0;
}
return 1;
}
}
+
+ /*
+ * For extended logical block sizes we cannot use verify when
+ * end to end data protection checks are enabled, as the PI
+ * section of data buffer conflicts with verify.
+ */
+ if (data->ms && data->pi_type && data->lba_ext &&
+ td->o.verify != VERIFY_NONE) {
+ log_err("%s: for extended LBA, verify cannot be used when E2E data protection is enabled\n",
+ f->file_name);
+ td_verror(td, EINVAL, "fio_ioring_cmd_open_file");
+ return 1;
+ }
}
if (!ld || !o->registerfiles)
return generic_open_file(td, f);