Skip to content

Conversation

@minwooim
Copy link
Contributor

In offline verification, io_hist_tree is not saved to the state file, so io_u->numberio is always zero in the second job (the verify phase). To address this, do_dry_run() simulates the saved WRITE job and logs io_u entries into io_hist_tree via log_io_piece(). The issue is that io_u->numberio is always zero when passed to log_io_piece().

To reproduce this issue, run the following jobs in turn.

[test]
name=writetest
filename=/dev/nvme0n1
ioengine=io_uring
direct=1
bs=512K
iodepth=128
rw=randwrite
runtime=20
time_based
verify=crc32c
verify_state_save=1
do_verify=0

[test]
name=writetest
filename=/dev/nvme0n1
ioengine=io_uring
direct=1
bs=512K
iodepth=128
rw=randwrite
verify=crc32c
verify_state_load=1
verify_only=1
verify_dump=1

Fixes: #2013

In offline verification, io_hist_tree is not saved to the state file, so
`io_u->numberio` is always zero in the second job (the verify phase). To
address this, `do_dry_run()` simulates the saved WRITE job and logs io_u
entries into io_hist_tree via `log_io_piece()`. The issue is that
`io_u->numberio` is always zero when passed to log_io_piece().

To reproduce this issue, run the following jobs in turn.

	[test]
	name=writetest
	filename=/dev/nvme0n1
	ioengine=io_uring
	direct=1
	bs=512K
	iodepth=128
	rw=randwrite
	runtime=20
	time_based
	verify=crc32c
	verify_state_save=1
	do_verify=0

	[test]
	name=writetest
	filename=/dev/nvme0n1
	ioengine=io_uring
	direct=1
	bs=512K
	iodepth=128
	rw=randwrite
	verify=crc32c
	verify_state_load=1
	verify_only=1
	verify_dump=1

Fixes: axboe#2013
Signed-off-by: Minwoo Im <[email protected]>
@vincentkfu
Copy link
Collaborator

Thanks. In fio 3.40 the stopping criterion did not depend on the io_u's numberio, but this was changed in 3.41 so that fio now depends on the io_u's numberio to know when to stop. So we need to properly set numberio when we save metadata in io_hist_tree.

@axboe axboe merged commit b2c6231 into axboe:master Nov 17, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fio tries to verify whole block device instead of only blocks written and saved in state file

3 participants