Closed Stan-He closed 1 year ago
@Stan-He This fix looks correct - would you like to work up a pull request?
Hi @Stan-He, I was looking at this issue and saw that you mentioned
I expect fio will generate 8 sequential I/O s before switch to another random offset but at first, fio will generate only 7 sequential I/Os then switch to new random offset
As per the fio man page for rw_sequencer=sequential (fio.1)
If you append e.g. 8 to randread, you would get a new random offset for every 8 I/Os. The result would be a seek for only every 8 I/Os, instead of for every I/O.
It seems to me that this behavior is correct, we are getting a random offset for every 8 I/O's i.e. 1 random offset and 7 sequential offset. It also mentions that fio will seek for random offset once in every 8 I/O's. Perhaps we should phrase this in a better way to avoid any confusion.
Please acknowledge the following before creating a ticket
Description of the bug: when using the config rw=randread:8 and rw_sequencer=sequential I expect fio will generate 8 sequential I/O s before switch to another random offset but at first, fio will generate only 7 sequential I/Os then switch to new random offset
After study the source code,I think the root cause may be in this function : get_next_offset and I attach the diff patch here, please check
Environment: CentOS Linux release 8.0.1905 (Core) 4.18.0-80.el8.x86_64
fio version: fio version commit 14691a4df98b85621b07dd2bdc0f0a960acbb8ba
Reproduction steps
use the jobfile below and execute with option --debug=io,random