aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnkit Kumar <ankit.kumar@samsung.com>2023-09-11 21:54:59 +0530
committerJens Axboe <axboe@kernel.dk>2023-09-11 10:55:56 -0600
commitba342e585aa512edbd37cf736850fcb3cb5ca76d (patch)
tree4df0e35630b5e365885e0eaa19a66d33b5b7b4f6
parentca9d8caba8c6c447aae0d3dc4a7f5270c1275782 (diff)
downloadfio-ba342e585aa512edbd37cf736850fcb3cb5ca76d.tar.gz
engines:io_uring_cmd: disallow verify for e2e pi with extended blocks
For extended logical block sizes we cannot use verify when end to end data protection checks are enabled. The CRC field in PI section of data buffer creates conflict during verify phase. The verify check is also redundant as end to end data protection already ensures data integrity. So disallow use of verify for this case. Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--engines/io_uring.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/io_uring.c b/engines/io_uring.c
index 6cdf1b4fe..05703df8e 100644
--- a/engines/io_uring.c
+++ b/engines/io_uring.c
@@ -18,6 +18,7 @@
#include "../lib/memalign.h"
#include "../lib/fls.h"
#include "../lib/roundup.h"
+#include "../verify.h"
#ifdef ARCH_HAVE_IOURING
@@ -1299,6 +1300,19 @@ static int fio_ioring_cmd_open_file(struct thread_data *td, struct fio_file *f)
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);