Skip to content

Commit

Permalink
engines:io_uring_cmd: disallow verify for e2e pi with extended blocks
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
ankit-sam authored and axboe committed Sep 11, 2023
1 parent ca9d8ca commit ba342e5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions engines/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "../lib/memalign.h"
#include "../lib/fls.h"
#include "../lib/roundup.h"
#include "../verify.h"

#ifdef ARCH_HAVE_IOURING

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ba342e5

Please sign in to comment.