From: Ankit Kumar <ankit.kumar@samsung.com>
To: axboe@kernel.dk, vincentfu@gmail.com
Cc: fio@vger.kernel.org, Ankit Kumar <ankit.kumar@samsung.com>
Subject: [PATCH 04/21] fio: add verify_header_seed option
Date: Thu, 27 Feb 2025 16:17:10 +0530 [thread overview]
Message-ID: <20250227104727.1794982-5-ankit.kumar@samsung.com> (raw)
In-Reply-To: <20250227104727.1794982-1-ankit.kumar@samsung.com>
Add a new option to disable the verify header seed check. The header
seed check is enabled by default.
There have been numerous issues observed with header seed mismatch. Hence
this allows end user to disable this check, and proceed with the checksum
verification. This is similar to option verify_write_sequence, which
allows the capability to disable write sequence number check.
Update the documentation accordingly.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
---
HOWTO.rst | 14 ++++++++++++--
cconv.c | 2 ++
fio.1 | 12 ++++++++++--
options.c | 11 +++++++++++
server.h | 2 +-
thread_options.h | 3 ++-
verify.c | 2 +-
7 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/HOWTO.rst b/HOWTO.rst
index c7c131e7..a221b9d8 100644
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -3830,8 +3830,9 @@ Verification
of the job. Each verification method also implies verification of special
header, which is written to the beginning of each block. This header also
includes meta information, like offset of the block, block number, timestamp
- when block was written, etc. :option:`verify` can be combined with
- :option:`verify_pattern` option. The allowed values are:
+ when block was written, initial seed value used to generate the buffer
+ contents etc. :option:`verify` can be combined with :option:`verify_pattern`
+ option. The allowed values are:
**md5**
Use an md5 sum of the data area and store it in the header of
@@ -4029,6 +4030,15 @@ Verification
fail).
Defaults to true.
+.. option:: verify_header_seed=bool
+
+ Verify the header seed value which was used to generate the buffer contents.
+ In certain scenarios with read / verify only workloads, when
+ :option:`norandommap` is enabled, with offset modifiers
+ (refer :option:`readwrite` and :option:`rw_sequencer`) etc verification of
+ header seed may fail. Disabling this option will mean that header seed
+ checking is skipped. Defaults to true.
+
.. option:: trim_percentage=int
Number of verify blocks to discard/trim.
diff --git a/cconv.c b/cconv.c
index ef3fbaa8..df841703 100644
--- a/cconv.c
+++ b/cconv.c
@@ -183,6 +183,7 @@ int convert_thread_options_to_cpu(struct thread_options *o,
o->verify_interval = le32_to_cpu(top->verify_interval);
o->verify_offset = le32_to_cpu(top->verify_offset);
o->verify_write_sequence = le32_to_cpu(top->verify_write_sequence);
+ o->verify_header_seed = le32_to_cpu(top->verify_header_seed);
o->verify_pattern_bytes = le32_to_cpu(top->verify_pattern_bytes);
o->buffer_pattern_bytes = le32_to_cpu(top->buffer_pattern_bytes);
@@ -444,6 +445,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
top->verify_interval = cpu_to_le32(o->verify_interval);
top->verify_offset = cpu_to_le32(o->verify_offset);
top->verify_write_sequence = cpu_to_le32(o->verify_write_sequence);
+ top->verify_header_seed = cpu_to_le32(o->verify_header_seed);
top->verify_pattern_bytes = cpu_to_le32(o->verify_pattern_bytes);
top->verify_fatal = cpu_to_le32(o->verify_fatal);
top->verify_dump = cpu_to_le32(o->verify_dump);
diff --git a/fio.1 b/fio.1
index 88d3be81..dd6d9546 100644
--- a/fio.1
+++ b/fio.1
@@ -3554,8 +3554,9 @@ If writing to a file, fio can verify the file contents after each iteration
of the job. Each verification method also implies verification of special
header, which is written to the beginning of each block. This header also
includes meta information, like offset of the block, block number, timestamp
-when block was written, etc. \fBverify\fR can be combined with
-\fBverify_pattern\fR option. The allowed values are:
+when block was written, initial seed value used to generate the buffer
+contents, etc. \fBverify\fR can be combined with \fBverify_pattern\fR option.
+The allowed values are:
.RS
.RS
.TP
@@ -3751,6 +3752,13 @@ useful for testing atomic writes, as it means that checksum verification can
still be attempted. For when \fBatomic\fR is enabled, checksum verification
is expected to succeed (while write sequence checking can still fail).
.TP
+.BI verify_header_seed \fR=\fPbool
+Verify the header seed value which was used to generate the buffer contents.
+In certain scenarios with read / verify only workloads, when \fBnorandommap\fR
+is enabled, with offset modifiers (refer options \fBreadwrite\fR and
+\fBrw_sequencer\fR), etc verification of header seed may fail. Disabling this
+option will mean that header seed checking is skipped. Defaults to true.
+.TP
.BI trim_percentage \fR=\fPint
Number of verify blocks to discard/trim.
.TP
diff --git a/options.c b/options.c
index c35878f7..416bc91c 100644
--- a/options.c
+++ b/options.c
@@ -3408,6 +3408,17 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_VERIFY,
},
+ {
+ .name = "verify_header_seed",
+ .lname = "Verify header seed",
+ .off1 = offsetof(struct thread_options, verify_header_seed),
+ .type = FIO_OPT_BOOL,
+ .def = "1",
+ .help = "Verify the header seed used to generate the buffer contents",
+ .parent = "verify",
+ .category = FIO_OPT_C_IO,
+ .group = FIO_OPT_G_VERIFY,
+ },
#ifdef FIO_HAVE_TRIM
{
.name = "trim_percentage",
diff --git a/server.h b/server.h
index d31cd688..e5968112 100644
--- a/server.h
+++ b/server.h
@@ -51,7 +51,7 @@ struct fio_net_cmd_reply {
};
enum {
- FIO_SERVER_VER = 108,
+ FIO_SERVER_VER = 109,
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,
diff --git a/thread_options.h b/thread_options.h
index 4d8addc4..d25ba891 100644
--- a/thread_options.h
+++ b/thread_options.h
@@ -157,6 +157,7 @@ struct thread_options {
unsigned int verify_state;
unsigned int verify_state_save;
unsigned int verify_write_sequence;
+ unsigned int verify_header_seed;
unsigned int use_thread;
unsigned int unlink;
unsigned int unlink_each_loop;
@@ -485,7 +486,7 @@ struct thread_options_pack {
uint32_t verify_state;
uint32_t verify_state_save;
uint32_t verify_write_sequence;
- uint32_t pad2;
+ uint32_t verify_header_seed;
uint32_t use_thread;
uint32_t unlink;
uint32_t unlink_each_loop;
diff --git a/verify.c b/verify.c
index 570c888f..49d44982 100644
--- a/verify.c
+++ b/verify.c
@@ -833,7 +833,7 @@ static int verify_header(struct io_u *io_u, struct thread_data *td,
hdr->len, hdr_len);
goto err;
}
- if (hdr->rand_seed != io_u->rand_seed) {
+ if (td->o.verify_header_seed && (hdr->rand_seed != io_u->rand_seed)) {
log_err("verify: bad header rand_seed %"PRIu64
", wanted %"PRIu64,
hdr->rand_seed, io_u->rand_seed);
--
2.25.1
next prev parent reply other threads:[~2025-02-27 7:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250227053350epcas5p31b3b5b47590d70804dade59842d87b27@epcas5p3.samsung.com>
2025-02-27 10:47 ` [PATCH 00/21] verify fixes and a new test suite Ankit Kumar
2025-02-27 7:28 ` fiotestbot
2025-02-27 10:47 ` [PATCH 01/21] filesetup: remove unnecessary check Ankit Kumar
2025-02-27 10:47 ` [PATCH 02/21] verify: add missing client/server support for verify_write_sequence Ankit Kumar
2025-02-27 10:47 ` [PATCH 03/21] init: write sequence behavior change for verify_only mode Ankit Kumar
2025-02-27 10:47 ` Ankit Kumar [this message]
2025-02-27 10:47 ` [PATCH 05/21] verify: disable header seed checking instead of overwriting it Ankit Kumar
2025-02-27 10:47 ` [PATCH 06/21] verify: enable header seed check for 100% write jobs Ankit Kumar
2025-02-27 10:47 ` [PATCH 07/21] verify: disable header seed check for verify_only jobs Ankit Kumar
2025-02-27 10:47 ` [PATCH 08/21] verify: header seed check for read only workloads Ankit Kumar
2025-02-27 10:47 ` [PATCH 09/21] verify: fix verify issues with norandommap Ankit Kumar
2025-02-27 10:47 ` [PATCH 10/21] verify: disable write sequence checks with norandommap and iodepth > 1 Ankit Kumar
2025-02-27 10:47 ` [PATCH 11/21] backend: fix verify issue during readwrite Ankit Kumar
2025-02-27 10:47 ` [PATCH 12/21] init: fixup verify_offset option Ankit Kumar
2025-02-27 10:47 ` [PATCH 13/21] verify: fix verify issue with offest modifiers Ankit Kumar
2025-02-27 10:47 ` [PATCH 14/21] verify: adjust fio_offset_overlap_risk to include randommap Ankit Kumar
2025-02-27 10:47 ` [PATCH 15/21] t/fiotestcommon: do not require nvmecdev argument for Requirements Ankit Kumar
2025-02-27 10:47 ` [PATCH 16/21] t/fiotestlib: improve JSON decoding Ankit Kumar
2025-02-27 10:47 ` [PATCH 17/21] t/fiotestlib: display stderr size when it is not empty but should be Ankit Kumar
2025-02-27 10:47 ` [PATCH 18/21] t/verify.py: Add verify test script Ankit Kumar
2025-02-27 10:47 ` [PATCH 19/21] t/fiotestcommon: add a success pattern for long tests Ankit Kumar
2025-02-27 10:47 ` [PATCH 20/21] t/run-fio-test: add t/verify.py Ankit Kumar
2025-02-27 10:47 ` [PATCH 21/21] ci: add nightly test for verify Ankit Kumar
2025-02-27 16:54 ` [PATCH 00/21] verify fixes and a new test suite Vincent Fu
2025-03-05 12:36 ` Shinichiro Kawasaki
2025-03-06 19:13 ` Vincent Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250227104727.1794982-5-ankit.kumar@samsung.com \
--to=ankit.kumar@samsung.com \
--cc=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=vincentfu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox