fio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Vincent Fu <vincentfu@gmail.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Dmitry Fomichev <Dmitry.Fomichev@wdc.com>,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: [PATCH 1/3] zbd: remove unnecessary verify_backlog check in zbd_file_reset()
Date: Tue, 30 Apr 2024 19:30:20 +0900	[thread overview]
Message-ID: <20240430103022.4136039-2-shinichiro.kawasaki@wdc.com> (raw)
In-Reply-To: <20240430103022.4136039-1-shinichiro.kawasaki@wdc.com>

The commit c5c8b92be5a2 ("zbd: fix zone reset condition for verify")
improved zbd_file_reset() to not reset zones when data to verify is
left. To check the left verify data, it tried to do the same as
check_get_verify() including the check for the modulo operation
"td->io_hist_len % td->o.verify_backlog". This check is required in
check_get_verify() to know when to do the verify backlog operation.
However, this check is not required in zbd_file_reset() since zone reset
is not related to the verify backlog timing. The unnecessary check for
"td->io_hist_len % td->o.verify_backlog" allows to reset zones even when
td->io_hist_len is non-zero and the data to verify is left. It erases
the data to verify and causes verify errors. Fix this by removing the
unnecessary check.

Fixes: c5c8b92be5a2 ("zbd: fix zone reset condition for verify")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 zbd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/zbd.c b/zbd.c
index 37417660..8a092cbe 100644
--- a/zbd.c
+++ b/zbd.c
@@ -1361,9 +1361,6 @@ void zbd_file_reset(struct thread_data *td, struct fio_file *f)
 	if (td->o.verify != VERIFY_NONE) {
 		verify_data_left = td->runstate == TD_VERIFYING ||
 			td->io_hist_len || td->verify_batch;
-		if (td->io_hist_len && td->o.verify_backlog)
-			verify_data_left =
-				td->io_hist_len % td->o.verify_backlog;
 		if (!verify_data_left)
 			zbd_reset_zones(td, f, zb, ze);
 	}
-- 
2.44.0


  reply	other threads:[~2024-04-30 10:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 10:30 [PATCH 0/3] zbd: fix two zonemode zbd problems Shin'ichiro Kawasaki
2024-04-30 10:30 ` Shin'ichiro Kawasaki [this message]
2024-04-30 10:30 ` [PATCH 2/3] t/zbd: add test case to confirm verify_backlog=1 options Shin'ichiro Kawasaki
2024-04-30 10:30 ` [PATCH 3/3] t/zbd: avoid test case 31 failure with small devices Shin'ichiro Kawasaki
2024-04-30 17:35 ` [PATCH 0/3] zbd: fix two zonemode zbd problems 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=20240430103022.4136039-2-shinichiro.kawasaki@wdc.com \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=Dmitry.Fomichev@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).