Re: [PATCH 4/5] engines/xnvme: add checks for verify, block size and metadata size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/13/24 10:33, Ankit Kumar wrote:
Add checks to ensure that the correct block size and metadata size is
passed by the user.
Disable normal verify checks when end to end data protection checks
are enabled because of CRC conflict.

Signed-off-by: Ankit Kumar <ankit.kumar@xxxxxxxxxxx>
---
  engines/xnvme.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 49 insertions(+)

diff --git a/engines/xnvme.c b/engines/xnvme.c
index c726b805..a8137286 100644
--- a/engines/xnvme.c
+++ b/engines/xnvme.c
@@ -11,6 +11,7 @@
  #include <assert.h>
  #include <libxnvme.h>
  #include "fio.h"
+#include "verify.h"
  #include "zbd_types.h"
  #include "fdp.h"
  #include "optgroup.h"
@@ -345,6 +346,49 @@ static void xnvme_fioe_cleanup(struct thread_data *td)
  	td->io_ops_data = NULL;
  }
+static int _verify_options(struct thread_data *td, struct fio_file *f,
+			   struct xnvme_fioe_fwrap *fwrap)
+{
+	struct xnvme_fioe_options *o = td->eo;
+	unsigned int correct_md_size;
+
+	for_each_rw_ddir(ddir) {
+		if (td->o.min_bs[ddir] % fwrap->lba_nbytes || td->o.max_bs[ddir] % fwrap->lba_nbytes) {

I thought this was wrong at first but I tried it on a device formatted in extended LBA mode (4096+64) and indeed lba_nbytes was 4160. I also checked the xNVMe source code and found where this can be set to be the sum of the LBA data and metadata sizes. It would be helpful to improve the xNVMe documentaion to make explicit what this value is.

Vincent




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux