Shin'ichiro Kawasaki [Fri, 25 Apr 2025 05:21:44 +0000 (14:21 +0900)]
zbd: introduce zbd_move_zone_wp()
As a preparation for continue_on_error option support for zonemode=zbd,
introduce the function zbd_move_zone_wp(). It moves write pointers by
calling blkzoned_move_zone_wp() or move_zone_wp() callback of IO
engines.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250425052148.126788-5-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Fri, 25 Apr 2025 05:21:43 +0000 (14:21 +0900)]
engines/libzbc: implement move_zone_wp callback
As a preparation for continue_on_error option support for zonemode=zbd,
implement move_zone_wp() callback for libzbc IO engine.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250425052148.126788-4-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Fri, 25 Apr 2025 05:21:42 +0000 (14:21 +0900)]
ioengine: add move_zone_wp() callback
As a preparation for continue_on_error option support for zonemode=zbd,
introduce a new callback move_zone_wp() for the IO engines. It moves the
write pointer by writing data in the specified buffer. Also bump up
FIO_IOOPS_VERSION to note that the new callback is added.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250425052148.126788-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Fri, 25 Apr 2025 05:21:41 +0000 (14:21 +0900)]
oslib: blkzoned: add blkzoned_move_zone_wp() helper function
As a preparation for continue_on_error option support for zonemode=zbd,
introduce a new function blkzoned_move_zone_wp(). It moves the write
pointer by data write. If data buffer is provided, call pwrite() system
call. If data buffer is not provided, call fallocate() to write zero
data.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250425052148.126788-2-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Wed, 16 Apr 2025 01:02:20 +0000 (19:02 -0600)]
Merge branch 'master' of https://github.com/blah325/fio
* 'master' of https://github.com/blah325/fio:
Fix hang on Windows when multiple --client args are present
jrizzo [Tue, 15 Apr 2025 17:57:20 +0000 (11:57 -0600)]
Fix hang on Windows when multiple --client args are present
The Windows poll function does not clear revents field before it is
populated. As a result, subsequent calls to poll using the same
pollfd reference return with revents set even when there is nothing
available to read. This later results in a hang in recv().
Signed-off-by: James Rizzo <james.rizzo@broadcom.com>
Shin'ichiro Kawasaki [Mon, 14 Apr 2025 06:27:21 +0000 (15:27 +0900)]
t/zbd: add test for the case all write zones have small remainder
The previous commit fixed the unexpected write stop when all write
target zones have small remainder sectors to write. Add a test case to
confirm the fix.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20250414062721.87641-5-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Mon, 14 Apr 2025 06:27:20 +0000 (15:27 +0900)]
zbd: finish zone when all random write target zones have small remainder
When a random write target offset points to a zone that is not writable,
zbd_convert_to_write_zone() attempts to convert the write offset to a
different, writable zone. However, the conversion fails when all of the
following conditions are met:
1) the workload has the max_open_zones limit
2) every write target zones, up to the max_open_zones limit, has
remainder sectors smaller than the block size
3) the next random write request targets a zone not in the write target
zone list
In this case, zbd_convert_to_write_zone() can not open another zone
without exceeding the max_open_zones constraint. Therefore, It does not
convert the write to a different zone printing with the debug message
"did not choose another write zone". This leads to an unexpected stop of
the random write workload.
To prevent the unexpected write stop, finish one of the write target
zones with small remainder sectors. Check if all write target zones have
small remainder, and store the result in the new local boolean variable
all_write_zones_have_small_remainder. When this condition is true,
choose one of the write target zones and finish it. Then return the zone
from zbd_convert_to_write_zone() enabling the write process to continue.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250414062721.87641-4-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Mon, 14 Apr 2025 06:27:19 +0000 (15:27 +0900)]
zbd: factor out zbd_pick_write_zone()
To prepare for the following fix, factor out a part of
zbd_convert_to_write_zone() to the new function zbd_pick_write_zone().
This function randomly chooses a zone in the array of write zones.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250414062721.87641-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Mon, 14 Apr 2025 06:27:18 +0000 (15:27 +0900)]
zbd: move zone finish operation to zbd_convert_to_write_zone()
Currently, when a write target zone has fewer remainder sectors than
the block size, fio finishes the zone to make the zone inactive (not
open), so that another zone can be open and used as a write target zone.
This zone finish operation is implemented in zbd_adjust_block().
However, this placement is less ideal because zbd_adjust_block() manages
not just write requests but also read and trim requests.
Since the zone finish operation is exclusively necessary for write
requests, implement it into zbd_convert_to_write_zone(). While at it,
improve the function comment.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250414062721.87641-2-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Mon, 31 Mar 2025 14:01:34 +0000 (10:01 -0400)]
ci: add verify-trim.py test script
On GitHub Actions we cannot insert kernel modules, so skip this script
on tests that run with pull requests and after every push. Instead run
this test with our nightly tests that run in a QEMU environment.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 31 Mar 2025 14:01:33 +0000 (10:01 -0400)]
t/verify-trim.py: superficial test script for verify/trim
Fio can verify trim operations. This script adds some simple test cases
for this feature.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 31 Mar 2025 14:01:32 +0000 (10:01 -0400)]
verify/trim: make trim_backlog_batch work
In order to detect when we are at the beginning of a trim phase we check
io_hist_len and should check that the previous operation was not a
*trim* (instead of not a read). Without this change trim_backlog_batch
will have no effect because after one batch is done, fio will simply
start a new batch because io_hist_len is still a multiple of
trim_backlog and the last operation in a batch was a trim which is not a
read.
For check_get_verify checking against read is appropriate but for
check_get_trim we must check against a trim.
Also we need to decrement the trim_batch count for the first trim
operation we send through.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 31 Mar 2025 14:01:31 +0000 (10:01 -0400)]
verify/trim: stop issuing trims if we run out
If we have drained the list of trim operations but its original contents
were fewer than a full batch we should zero out the running batch count
to make sure that we issue another full set of trim_backlog write
operations before considering trims again. Otherwise we will immediately
trim after each subsequent write operation until we have met the batch
size requirement.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 31 Mar 2025 14:01:30 +0000 (10:01 -0400)]
init: error out when readonly is set for a trim/verify workload
Fio may issue trim commands for a verify/trim job. Abort and print an
error message if this type of job is run with the --readonly option.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 31 Mar 2025 14:01:29 +0000 (10:01 -0400)]
trim_verify: include a trim panel in the output
The trim bit in td_ddir is not set when trim_percentage/backlog is
enabled yet fio still issues trim operations. Detect these cases and
produce output describing trim operations if we issued any.
This is similar to the fix (
615c794cbf851c994e94fffe8b8f565e64f137a5)
committed for verify_backlog.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 31 Mar 2025 14:01:28 +0000 (10:01 -0400)]
fio: allow trim operations for verify/trim workloads
Fio has the ability to verify trim operations by running a verify
workload and setting the trim_percentage, trim_backlog, and
trim_verify_zero options. Some of the written blocks will then be
trimmed and then read back to see if they are zeroed out.
This patch changes fio_ro_check to allow trim operations when fio is
running a verify/trim workload.
Fixes:
196ccc44 ("fio.h: also check trim operations in fio_ro_check")
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Fri, 4 Apr 2025 11:41:50 +0000 (07:41 -0400)]
ci: set kvm permissions for GHA QEMU jobs
The image used by GitHub-hosted runners changed the default kvm device
permissions recently rendering us no longer able to start guest VMs. The
error message:
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize kvm: Permission denied
Working run: https://github.com/fiotestbot/fio/actions/runs/
14186873066
Failed run: https://github.com/fiotestbot/fio/actions/runs/
14211189491
Explicitly give the GitHub Actions runner user permission to access the
/dev/kvm device following the guide at
https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Jens Axboe [Tue, 18 Mar 2025 13:14:24 +0000 (07:14 -0600)]
Merge branch 'iouring-spellingfix-2025-03-18' of https://github.com/proact-de/fio
* 'iouring-spellingfix-2025-03-18' of https://github.com/proact-de/fio:
Fix spelling error in IO uring engine.
Martin Steigerwald [Tue, 18 Mar 2025 10:41:45 +0000 (11:41 +0100)]
Fix spelling error in IO uring engine.
Vincent Fu [Fri, 7 Mar 2025 16:39:42 +0000 (11:39 -0500)]
Merge branch 'dfs' of https://github.com/henglgh/fio
* 'dfs' of https://github.com/henglgh/fio:
dfs: fix fail to load dfs engine
fugen [Fri, 7 Mar 2025 08:50:45 +0000 (16:50 +0800)]
dfs: fix fail to load dfs engine
dfs engine mistakenly used a symbol named 'dfs' to call
dlsym(dlhandle, engine_lib), this symbol points a global
variable in dfs.c file. I change this variable name to
'daosfs' to point to 'ioengine' symbol correctly.
Fixes: https://github.com/axboe/fio/issues/1874
Signed-off-by: fugen <fugen@cstor.cn>
Vincent Fu [Mon, 24 Feb 2025 19:39:13 +0000 (19:39 +0000)]
ci: add nightly test for verify
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Tue, 28 Jan 2025 22:07:12 +0000 (22:07 +0000)]
t/run-fio-test: add t/verify.py
Add the verify test script to our test runner.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Thu, 30 Jan 2025 18:25:50 +0000 (18:25 +0000)]
t/fiotestcommon: add a success pattern for long tests
On Windows the verify test script runs for longer than 10 minutes. Add a
success pattern that accommodates this test.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 27 Jan 2025 19:46:54 +0000 (19:46 +0000)]
t/verify.py: Add verify test script
The script contains three sets of tests. The first set of tests
exercises fio's decision making about checking the verify header's
sequence number and random seed. The second set of tests is aimed at
making sure that the checksum functions can detect data mismatches. The
final set of tests exercise fio's verify-related options such as
verify_backlog and verify_inteval.
This test script includes two checksum lists. The first list (default)
contains a subset of the checksum methods offered by fio, whereas the
second list contains the full set of checksum methods. The second, full
set can be run by specifying -c or --complete. Testing all of the
checksum methods can take a long time.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Vincent Fu [Wed, 5 Feb 2025 01:44:31 +0000 (01:44 +0000)]
t/fiotestlib: display stderr size when it is not empty but should be
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Tue, 4 Feb 2025 19:52:28 +0000 (19:52 +0000)]
t/fiotestlib: improve JSON decoding
Sometimes error/informational messages appear at the end of the JSON
data. Try to parse as JSON only the text between the first { and the
last }.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Wed, 29 Jan 2025 22:29:23 +0000 (22:29 +0000)]
t/fiotestcommon: do not require nvmecdev argument for Requirements
Enable Requirements checking for test suites that do not have an
nvmecdev argument. macOS does not support NUMA placement so we need to
skip some tests on that platform when the test suite does not have an
nvmecdev argument. This will be used in an upcoming patch for a set of
verify tests.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Ankit Kumar [Thu, 30 Jan 2025 14:57:12 +0000 (20:27 +0530)]
verify: adjust fio_offset_overlap_risk to include randommap
Currently we are using a list to log I/O history if:
* randommap is enabled and fio manages to allocate memory for it.
* there are no offset modfiers with any jobs.
For any different scenario we use an RB tree to handle offset overlaps,
which disables header seed checks for them.
This commit expands fio_offset_overlap_risk() such that it covers
file_randommap() cases.
For random workload with this change these are the possible scenarios
-----------------------------------------------------------------------
| | norandommap=0 | norandommap=1 |
|-----------------------------------------------------------------------|
| softrandommap=0 | list (No change) | RB tree |
| | (fio was able to allocate memory) | (No change) |
|-----------------|------------------------------------|----------------|
| | RB tree (Now always) | RB tree |
| softrandommap=1 |Even if fio was able to allocate mem| (No Change) |
-----------------------------------------------------------------------
With randommap enabled and softrandommap=1 we now always use an RB tree,
even when fio is able to allocate memory for random map. In this case
verify header seed check will be disabled. If users want to check header
seed they can either disable softrandommap or explicilty enable
verify_header_seed.
Effectively this changes randommap from being a per-file property to
per-job property.
This also fixes rand seed mismatch isues, that have been observed when
multiple files are used, such as for the below mentioned configuration.
[global]
do_verify=1
verify=md5
direct=1
[multi_file]
rw=readwrite
directory=.
nrfiles=2
size=32K
Here is the truncated log with debug=verify flag, and an extra log when
the seed gets generated as well as the mismatch.
verify 368109 file ./multi_file.0.1 seed
46386204153304124 offset=0, length=4096
verify 368109 file ./multi_file.0.0 seed
9852480210356360750 offset=0, length=4096
verify 368109 file ./multi_file.0.1 seed
4726550845720924880 offset=4096, length=4096
verify: bad header rand_seed
9852480210356360750, wanted
46386204153304124 at file ./multi_file.0.0 offset 0, length 4096 (requested block: offset=0, length=4096)
Earlier the I/O entries were getting logged in an RB tree, as we were
relying on file_randommap(), which was false for sequential workloads.
In RB tree, files are prioritized first and then the offset. Thus during
the verify phase the I/O entries are removed from tree in order of file
and then offset which is not how it was originally written. With the new
checks, for sequential workload we now store the entries in the list
instead of RB tree.
Even for sequential workload if the user fortuitously specified
norandommap or softrandommap, then I/Os will be stored in an RB tree.
However in this case header seed checks will be disabled.
fixes #740
fixes #746
fixes #844
fixes #1538
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Fri, 14 Feb 2025 19:48:34 +0000 (01:18 +0530)]
verify: fix verify issue with offest modifiers
Offset modifiers such as rw=readwrite:8 or rw=write:4K can create
overlaps. For these cases use RB tree instead of list to log the I/O
entries.
Add a helper function fio_offset_overlap_risk() to decide whether to log
the I/O entry in an RB tree or a list.
Disable header seed verification if there are offset modifiers, unless
its explicitly enabled.
fixes #1503
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Tue, 28 Jan 2025 14:46:14 +0000 (20:16 +0530)]
init: fixup verify_offset option
Verify offset should swap verification header within the verify interval.
If this is not the case return error. Update the doc. accordingly.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Tue, 28 Jan 2025 19:41:36 +0000 (01:11 +0530)]
backend: fix verify issue during readwrite
In readwrite mode if specified io_size > size, offsets can overlap.
This will result in verify errors. Add check to handle this case.
Fixes:
d782b76f ("Don break too early in readwrite mode")
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Wed, 29 Jan 2025 18:34:58 +0000 (00:04 +0530)]
verify: disable write sequence checks with norandommap and iodepth > 1
With norandommap for async I/O engines specifying I/O depth > 1, it is
possible that two or more writes with the same offset are queued at once.
When fio tries to verify the block, it may find a numberio mismatch
because the writes did not land on the media in the order that they were
queued. Avoid these spurious failures by disabling sequence number
checking. Users will still be able to enable sequence number checking
if they explicitly set the verify_header_sequence option.
fio -name=verify -ioengine=libaio -rw=randwrite -verify=sha512 -direct=1 \
-iodepth=32 -filesize=16M -bs=512 -norandommap=1 -debug=io,verify
Below is the truncated log for the above command demonstrating the issue.
This includes extra log entries when write sequence number is saved and
retrieved.
set: io_u->numberio=28489, off=0x5f2400
queue: io_u 0x5b8039e30d40: off=0x5f2400,len=0x200,ddir=1,file=verify.0.0
set: io_u->numberio=28574, off=0x5f2400
iolog: overlap
6235136/512,
6235136/512
queue: io_u 0x5b8039e75500: off=0x5f2400,len=0x200,ddir=1,file=verify.0.0
complete: io_u 0x5b8039e75500: off=0x5f2400,len=0x200,ddir=1,file=verify.0.0
complete: io_u 0x5b8039e30d40: off=0x5f2400,len=0x200,ddir=1,file=verify.0.0
retrieve: io_u->numberio=28574, off=0x5f2400
queue: io_u 0x5b8039e1db40: off=0x5f2400,len=0x200,ddir=0,file=verify.0.0
bad header numberio 28489, wanted 28574 at file verify.0.0 offset
6235136, length 512 (requested block: offset=
6235136, length=512)
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Wed, 29 Jan 2025 18:00:24 +0000 (23:30 +0530)]
verify: fix verify issues with norandommap
When norandommap is enabled, fio logs the I/O entries in a RB tree. This
is to account for offset overlaps and overwrites. Then during verify
phase, the I/O entries are picked from the top and in this case the
smallest offset is verified first and so on. This creates a mismatch
during the header verification as the seed generated at the time of read
differs from what was logged during write. Skip seed verification in
this scenario.
fixes #1756
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Fri, 14 Feb 2025 18:35:11 +0000 (00:05 +0530)]
verify: header seed check for read only workloads
For read jobs, users should have the option to verify header seeds at a
later point of time. Currently for read jobs header seeds are not
generated
Consider the below mentioned write followed by read workloads. Here fio
should allow header seed verification.
fio --name=test --filesize=16k --rw=randwrite --verify=md5
fio --name=test --filesize=16k --rw=randread --verify=md5 --verify_header_seed=1
However there are other scenarios where header seed verification will
fail. These include:
* randrepeat is set to false, leading to different seed across runs.
* randseed is different across write and read workloads.
* Read workload is changed from sequential to random or vice versa
across runs.
* Read workloads run in the same invocation as write, i.e. a write job
followed by a stonewall read job. Header seed verification will fail
because random seeds vary between jobs. Refer t/jobs/t0029.fio
If verify_header_seed is explicitly enabled, fio will verify header seed
for the workload.
This reverts part of commit mentioned below
Fixes:
def41e55 ("verify: decouple seed generation from buffer fill")
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Fri, 14 Feb 2025 18:08:03 +0000 (23:38 +0530)]
verify: disable header seed check for verify_only jobs
For the invoked verify_only job, header seed can match only if it
exactly matches the original write job. This means either randrepeat
should be true, or we must use the same randseed which was used with the
original write job. After write the verify_only workload shouldn't be
changed from sequential to random or vice versa.
Considering these constraints disable verify_header_seed for verify_only
jobs. Users will still be able to enable header seed checking if they
explicitly set the verify_header_sequence option.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Thu, 13 Feb 2025 01:14:37 +0000 (06:44 +0530)]
verify: enable header seed check for 100% write jobs
There are 3 modes where verify can be performed. write, read and
readwrite. The existing readwrite condition prohibits header seed check
for write or read workloads. For write workloads, there shouldn't be any
extra limitation that triggers header seed mismatch which cannot be
triggered with readwrite workloads. Hence modify this condition to only
disable verify header seed checks for read workload.
The subsequent patches fixes header seed mismatch issues.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Fri, 7 Feb 2025 17:53:13 +0000 (23:23 +0530)]
verify: disable header seed checking instead of overwriting it
The existing header seed is overwritten if zone reset frequency is set or
if verify backlog is enabled. Disable verify header seed check for these
scenarios, unless there is an explicit request to enable it.
Note: There is no fio behavior change intended by this patch.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Fri, 7 Feb 2025 17:44:15 +0000 (23:14 +0530)]
fio: add verify_header_seed option
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>
Ankit Kumar [Fri, 14 Feb 2025 17:21:00 +0000 (22:51 +0530)]
init: write sequence behavior change for verify_only mode
Change the behavior for verify_only mode to not disable
verify_write_sequence unless its explicitly enabled.
Update the fio doc. accordingly.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Fri, 14 Feb 2025 16:53:00 +0000 (22:23 +0530)]
verify: add missing client/server support for verify_write_sequence
Ensure that we convert verify_write_sequence option for client/server.
Fixes:
2dd80ee4 ("fio: Support verify_write_sequence")
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Ankit Kumar [Wed, 22 Jan 2025 21:15:47 +0000 (02:45 +0530)]
filesetup: remove unnecessary check
If read_iolog_file is set, the goto statement moves it beyond this
point. So remove this redundant check.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Vincent Fu [Wed, 5 Mar 2025 17:05:52 +0000 (12:05 -0500)]
Merge branch 'update-docs-for-compare' of https://github.com/minwooim/fio
* 'update-docs-for-compare' of https://github.com/minwooim/fio:
docs: update docs for verify_mode=compare of io_uring_cmd
Minwoo Im [Sat, 1 Mar 2025 23:47:33 +0000 (08:47 +0900)]
docs: update docs for verify_mode=compare of io_uring_cmd
Add missing limitation of verify_mode=compare in io_uring_cmd
ioengine. Data verification with NVMe COMPARE command has been
introduced in Commit
6170d92a61da ("io_uring: Support Compare command
for verification") and this should have documented COMPARE command only
supports in case of data pattern verification.
The two more options should be with --verify_mode=compare.
verify_mode=compare
verify=pattern
verify_pattern=<pattern>
Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
Jens Axboe [Thu, 20 Feb 2025 20:07:41 +0000 (13:07 -0700)]
Re-introduce RWF_DONTCACHE
This used to be called RWF_UNCACHED, and it never made it upstream. But
as of the 6.14 kernel, RWF_DONTCACHE exists, and provides the same
guarantees that the older RWF_UNCACHED did - it's applied to buffered
IO, and any page cache instantiated for this read or write will be
dropped on IO completion. Any data already in cache will remain in cache
and will not cause IO to be issued.
This adds support for the io_uring and sync IO engines.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Thu, 20 Feb 2025 16:48:22 +0000 (09:48 -0700)]
Merge branch 'fix-DNDEBUG' of https://github.com/dandedrick/fio
* 'fix-DNDEBUG' of https://github.com/dandedrick/fio:
t/read-to-pipe-async: fix -DNDEBUG support
Dan Dedrick [Thu, 20 Feb 2025 15:51:12 +0000 (10:51 -0500)]
t/read-to-pipe-async: fix -DNDEBUG support
When NDEBUG is defined this was trying to call log_err but it didn't
include the header file or link against the relevant .o file. This will
now fully build with -DNDEBUG.
Signed-off-by: Dan Dedrick <dan.dedrick@gmail.com>
Jens Axboe [Tue, 18 Feb 2025 15:36:57 +0000 (08:36 -0700)]
Fio 3.39
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Mon, 17 Feb 2025 23:30:07 +0000 (16:30 -0700)]
crc/sha512: fix missing finalize part of sha512 hash
The sha512 implementation was broken, make an attempt at actually
making it work...
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Ritesh Harjani (IBM) [Sat, 15 Feb 2025 08:41:30 +0000 (14:11 +0530)]
libaio: Add vectored io support
This adds support for doing vectored I/O to libaio.
Instead of using pread/pwrite calls, this allows libaio to use
preadv/pwritev calls which uses iovecs.
option: libaio_vectored=1
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/f0d66512e3df3d2142910e996c42389c21232d12.1739608655.git.ritesh.list@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Fri, 14 Feb 2025 14:26:48 +0000 (09:26 -0500)]
Merge branch 't0036-0037' of https://github.com/kawasaki/fio
* 't0036-0037' of https://github.com/kawasaki/fio:
t/jobs/t0036,0037: add tests for verify_state_save/load options
Shin'ichiro Kawasaki [Fri, 14 Feb 2025 01:22:37 +0000 (10:22 +0900)]
t/jobs/t0036,0037: add tests for verify_state_save/load options
Add tests to exercise the options verify_state_save and
verify_state_load. The test case t0036 does it for psync I/O engine and
single file, and t0037 does it for libaio I/O engine and multiple files.
The test cases confirm no regression by the recent commits relevant to
the options.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Jens Axboe [Thu, 13 Feb 2025 15:58:17 +0000 (08:58 -0700)]
t/io_uring: fix passthrough fixed buffer support
A previous commit changed t/io_uring to register a single region for
all of the registered buffers, and while it updated non-passthrough IO
for that change, the passthrough path still sets a specific buffer
index. This makes passthrough with fixed buffers fail for any buffer
but the first one, as it's asking for a buffer that doesn't exist rather
than index the first one. That causes -EFAULT completions.
Ensure the buf_index is set to 0 for passthrough as well.
Fixes:
21f461f8c2b9 ("t/io_uring: register single buffer for whole IO region")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Thu, 13 Feb 2025 05:25:10 +0000 (14:25 +0900)]
t/verify-state.c: adjust to verify state format change
The previous commit modified the format of verify state files. To adjust
to the change, add support of the new field "max_no_comps_per_file" and
pass it to __thread_io_list_sz(). Also check the version number against
the new version 4.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20250213052510.1474423-4-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Thu, 13 Feb 2025 05:25:09 +0000 (14:25 +0900)]
verify: double number of writes to save completions
When asynchronous write workloads have the verify option and the
verify_state_save option enabled, fio saves the last write completions
in the verify state file. The number of writes saved in the verify state
file is equal to the I/O depth specified by the iodepth option. Let N
represent the iodepth. Subsequent verify workloads with the
verify_state_load option read the saved verify state file. As to the
last N verify I/Os, fio checks if they have corresponding write
completions saved by the write workloads. If not, fio does not perform
the verify I/Os since the verify data was not written. This approach
prevents the false-positive verify failures. Refer to the following two
commits for the detail:
ca09be4b1a8e ("Add support for verify triggers and verify state saving")
94a6e1bb4e7d ("Fix verify state for multiple files")
However, when the write workloads are asynchronous, the completion order
of writes can differ from their issue order. In such cases, a write
named "W_before_last_N", issued before the last N writes, may complete
slowly, fall within the last N completions, and be saved in the verify
state file. Conversely, one of the last issued N writes, named
"W_in_last_N", may complete early, and not be saved in the verify state
file. When the subsequent verify workload reads the verify state file
and runs, fio prepares the I/O for the "W_in_last_N" at some point. Fio
tries to find its offset in the verify state file, but that is not
found. Then fio stops the verify workload. This unexpected verify stop
confuses users.
To reduce the chance of the unexpected verify stop due to fluctuations
in the write completion order, increase the number of write completions
saved in the verify state file. Since this issue only occurs with
asynchronous writes, increase the number only for asynchronous
workloads. Add a new field "last_write_comp_depth" to struct thread_data
to store the number. To adjust the size of the verify state file, add a
new field "max_no_comps_per_file" to struct thread_io_list. This field
reflects the number of writes to be saved for each file and allows to
calculate the state file size. These changes affect the verify state
file format, then bump up the verify state header version from 3 to 4.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20250213052510.1474423-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Shin'ichiro Kawasaki [Thu, 13 Feb 2025 05:25:08 +0000 (14:25 +0900)]
verify: print message when verify_state_should_stop() returns false
When verify workloads with the verify_state_load option target an offset
that is not saved in the verify state file, verify_state_should_stop()
function returns false and it stops the verify workloads. This workloads
stop is made without providing a message to users, making it difficult
for them to understand why they stopped. Print a message to inform users
why the verify workloads stopped.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20250213052510.1474423-2-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Thu, 23 Jan 2025 16:03:18 +0000 (11:03 -0500)]
t/run-fio-tests: add client/server test script
Add the client/server test script to the global test harness.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Mon, 13 Jan 2025 23:51:50 +0000 (23:51 +0000)]
t/client-server: basic client/server test script
Currently there are only two sets of test cases:
- check that fio correctly handles the global options dictionary in the
JSON output with one or more servers with job files with and without
global sections.
- check that the [s,c]lat_percentiles options work for the "All clients"
summary data.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Thu, 23 Jan 2025 15:55:39 +0000 (10:55 -0500)]
ci: install kill binary for Debian platforms
kill is a bash built-in and the binary is not installed by default on
Debian. Install the binary because we need to use Python's subprocess
to run the kill command to stop the fio servers for the client/server
test script.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Tue, 14 Jan 2025 18:27:55 +0000 (18:27 +0000)]
t/fiotestlib: improve JSON decoding
Instead of skipping up to a fixed number of lines when trying to decode
JSON output, just skip everything until the first opening {.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Tue, 7 Jan 2025 21:29:36 +0000 (21:29 +0000)]
client: separate global options from multiple servers
In a single client invocation, currently all global options from all
servers accumulate in a single global options dictionary. This is fine
if the invocation creates only a single server session, but when a
client connects to multiple servers, this is a mess because there is no
way to assign different global options to different jobs.
This patch instead creates a global options array when a client creates
multiple server sessions. Each array element contains the global options
for a different server session and is identified by the hostname and
port. When the client connects to only a single server, the global
options object remains a dictionary in order to maintain backward
compatibility.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Tue, 7 Jan 2025 20:56:19 +0000 (20:56 +0000)]
json: allow empty string values
The JSON standard permits empty strings. Currently fio's JSON module
returns an error when it encounters an empty string. Change this to
allow empty strings.
https://www.json.org/ is the reference I used for the JSON standard.
This is needed for upcoming patches to support FIO_OPT_STR_SET job
options (norandommap, time_based, etc) that are enabled when the option
is included without specifying a value for it. The value for these
options is best represented by an empty string. Disallowing empty string
values would prevent these options from appearing in job option
dictionaries in the JSON output.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Fri, 3 Jan 2025 19:33:37 +0000 (19:33 +0000)]
client: rename job_opt_object to global_opt_object
This structure contains only options from the global section of a job
file, so make the name reflect this in order to make the code clearer.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Shin'ichiro Kawasaki [Wed, 22 Jan 2025 01:38:35 +0000 (10:38 +0900)]
t/zbd: add test case to confirm no max_open_zones limit check
The previous commit fixed the max_open_zones limit check for non-write
jobs. Add a test case to confirm the fix.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250122013835.1223725-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Vincent Fu <vincentfu@gmail.com>
Shin'ichiro Kawasaki [Wed, 22 Jan 2025 01:38:34 +0000 (10:38 +0900)]
zbd: do not check open zones status and limits when jobs do not write
Currently, fio checks the conditions of each zone within the IO range at
the job start. If a zone is in an open condition, it is added to the
write target zone array. If the number of write target zones exceeds the
max_open_zones or job_max_open_zones limit, fio terminates with the
error message "Number of open zones exceeds max_open_zones limit". This
check for zone condition and the resulting termination occur even when
the job does not perform a write operation, leading to confusion among
users.
To avoid the confusion, skip the check when jobs do not perform write
operations. Additionally, print the message to inform that the
job_max_open_zones limit does not work for non-write jobs.
Fixes:
954217b90191 ("zbd: Initialize open zones list referring zone status at fio start")
Fixes:
8ac768899d63 ("zbd: do not reset extra zones in open conditions")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250122013835.1223725-2-shinichiro.kawasaki@wdc.com
Signed-off-by: Vincent Fu <vincentfu@gmail.com>
Vincent Fu [Tue, 21 Jan 2025 16:38:18 +0000 (11:38 -0500)]
Merge branch 'pre_success' of https://github.com/kawasaki/fio
* 'pre_success' of https://github.com/kawasaki/fio:
t/run-fio-tests: remove redundant pre_success lines
Shin'ichiro Kawasaki [Fri, 17 Jan 2025 13:01:39 +0000 (22:01 +0900)]
t/run-fio-tests: remove redundant pre_success lines
Recently, three test case definitions were added to t/run-fio-tests. The
added definitions have redundant pre_success lines. Remove them.
Fixes:
8b0018e93eac ("t/jobs/t0033: add test for the log file format")
Fixes:
20d0ba84d3b7 ("t/jobs/t0034: add test for the log_issue_time option")
Fixes:
a189fc720a4d ("t/jobs/t0035: add test for the file operations IO engine")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Vincent Fu [Mon, 16 Dec 2024 18:23:58 +0000 (13:23 -0500)]
Merge branch 'master' of https://github.com/termim/fio
* 'master' of https://github.com/termim/fio:
Add .readthedocs.yaml file.
Mikhail Terekhov [Sun, 17 Dec 2023 20:59:52 +0000 (15:59 -0500)]
Add .readthedocs.yaml file.
Now to create documentation on readthedocs.org the project must have
a configuration file.
Signed-off-by: Mikhail Terekhov <termim@gmail.com>
Ronnie Sahlberg [Mon, 9 Dec 2024 05:47:58 +0000 (15:47 +1000)]
nfs: add support for new libnfs API
New update of libnfs will have a new API that changes some signatures,
primarily in order to make nfs_[p]read[_async] calls
zero-copy in the sense that (almost) no data copy is done in the library
and READ3/READ4 payloads are read straigth from the socket into the
application buffer.
In-library zero-copy only works for !krb5 and !tls sessions but can provide
significant boost for read-intensive workloads when can be used.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Link: https://lore.kernel.org/r/20241209054758.3269700-1-ronniesahlberg@gmail.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Wed, 4 Dec 2024 19:00:53 +0000 (19:00 +0000)]
stat: fix unified_rw_reporting=both BW and IOPS
When unified_rw_reporting=both, the value for the significant_figures
option is not populated in the struct thread_stat containing the mixed
r/w/t data. Thus, when bandwidth and IOPS numerical values are converted
to strings, they are converted to "0".
This patch populates the significant figures member of struct
thread_stat for the mixed r/w/t data.
Fixes: https://github.com/axboe/fio/issues/1844
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Fri, 22 Nov 2024 18:57:56 +0000 (18:57 +0000)]
docs: explain type of memory allocated by md_per_io_size
Note that md_per_io_size always uses malloc for io_uring_cmd.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Fri, 22 Nov 2024 16:29:05 +0000 (16:29 +0000)]
engines/io_uring_cmd: disable iomem=malloc check for metadata
Before this patch, the io_uring_cmd ioengine would check that
iomem=malloc (the default) before allocating memory for metadata
buffers. If the user had selected a different option, fio would abort
the job with an error message.
This patch removes this check. We do not need to restrict users to
iomem=malloc for io_uring_cmd workloads involving protection
information. Users may wish to use huge pages for LBA data in order to
submit larger IOs. Since metadata buffers will be smaller they can still
use regular pages.
Reported-by: 전규범 <gyubeom.jeon@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Jens Axboe [Tue, 5 Nov 2024 14:57:41 +0000 (07:57 -0700)]
t/io_uring: fix size confusion in allocate_mem()
It should always be using the size passed in as to what amount of memory
should be allocated, not the individual IO size. This didn't matter
previously, as each buffer was allocated independently, but it matters
now where a single region will cover all IO buffers.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Tue, 5 Nov 2024 14:51:05 +0000 (07:51 -0700)]
Merge branch 'io_uring-depth'
* io_uring-depth:
engines/io_uring: don't mess with non power-of-2 queue depth
Jens Axboe [Mon, 4 Nov 2024 17:27:06 +0000 (10:27 -0700)]
t/io_uring: add symbolic defines for NOP flags
Add them to io_uring.h and use them in t/io_uring.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Mon, 4 Nov 2024 17:23:47 +0000 (10:23 -0700)]
t/io_uring: enable registered file/buffer testing with NOP
Enable the -N NOP mode to use registered files and buffers, handy for
testing the kernel side.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Mon, 4 Nov 2024 17:20:56 +0000 (10:20 -0700)]
t/io_uring: register single buffer for whole IO region
Rather than register N buffers for depth of N, just allocate a single
contig region and register that as a single buffer. That's more
efficient on the kernel side, as only a single resource need to be
managed.
Should have no functional changes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Fri, 11 Oct 2024 22:01:26 +0000 (22:01 +0000)]
engines/io_uring_cmd: do not send data buffer for write zeroes
For write zeroes commands, do not send a data bufffer address. If we do
send an address, the driver will try to carry out DMA mapping and
encounter driver mdts limitations which do not apply to write zeroes
commands. This lets us send large write zeroes commands to deallocate
the device with the deac=1.
This is only done for the non-vectored IO case. For the vectored IO
case, the driver requires data buffer addresses to be sent. Regardless
it does not make sense to use vectored IO for write zeroes.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Thu, 10 Oct 2024 17:31:51 +0000 (17:31 +0000)]
engines/io_uring_cmd: add option to set DEAC bit for write zeroes
Add an option for fio to set the DEAC bit for write zeroes commands.
This instructs the device to also deallocate the specified logical
blocks in the course of completing the write zeroes operation. This only
has an effect when write_mode=zeroes is specified.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Tue, 15 Oct 2024 15:21:49 +0000 (11:21 -0400)]
ci: always update apt cache before installing pkgs
For all of our custom local actions make sure we update the apt cache
before trying to install packages. This will prevent errors when the
runner is started with a stale apt cache.
Example: https://github.com/vincentkfu/fio/actions/runs/
11339008514/job/
31533113877
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Jens Axboe [Mon, 14 Oct 2024 16:00:36 +0000 (10:00 -0600)]
engines/io_uring: don't mess with non power-of-2 queue depth
io_uring needs the rings to be a power-of-2 in sizing, but it does not
need to be messing with the queue depth driven to the device. Rather
than round everything up, only round up the API parts.
Reported-by: Riley Thomasson <riley@purestorage.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Thu, 3 Oct 2024 20:00:12 +0000 (20:00 +0000)]
docs: mention unsupported configuration
It does not make sense when group_reporting is used for the constituent
jobs to have different values for options like unified_rw_reporting,
?lat_percentiles, etc. Mention that configurations with different values
for these parameters are unsupported.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Thu, 3 Oct 2024 19:25:33 +0000 (19:25 +0000)]
client/server: enable "All clients" latency percentiles
The ?lat_percentile toggles and list of percentiles to report from the
thread_stat payload have not been propagated to the overall summary
report. Enable "All clients" latency percentile reporting by arbitrarily
using the toggles and percentile list from the first thread_stat
payload sent from the server.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Wed, 2 Oct 2024 18:47:09 +0000 (14:47 -0400)]
docs: addtions to client/server section
Mention the unique_filename option in the client/server section and also
note that fio will produce aggregate summary output for all jobs when
running jobs on multiple servers.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Fri, 27 Sep 2024 20:37:31 +0000 (20:37 +0000)]
ci/qemu: use a tarball to xfer source code to guest
Instead of faking a GitHub Actions runner environment, just create a
source code tarball and transfer it to the guest VM. This is simpler and
does not depend on the continued existence of the action used
previously.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Jens Axboe [Wed, 2 Oct 2024 18:53:13 +0000 (12:53 -0600)]
Fio 3.38
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Mon, 30 Sep 2024 15:42:22 +0000 (09:42 -0600)]
engines/io_uring: add support for async TRIM
6.12 kernels and newer support async trim, which means the non-cmd path
no longer needs to quiesce the queue and issue a sync trim for a workload
that includes trim/discard requests.
The engine will assume the support is there, and if it gets -EINVAL when
trying an async trim, then it'll punt back to the using the sync trim
again.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Mon, 30 Sep 2024 15:21:17 +0000 (09:21 -0600)]
t/io_uring: only load tail once per reap loop
It'll never change with the settings that t/io_uring uses to setup the
ring - and even if it could, it's still cheaper to just read the tail
once per reap.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Fri, 27 Sep 2024 19:27:28 +0000 (19:27 +0000)]
ci/qemu: change the name of this workflow
Reduce confusion by giving the guest VM workflow a name different from
our run-fio-tests.py workflow.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Vincent Fu [Fri, 27 Sep 2024 19:24:08 +0000 (19:24 +0000)]
ci: allow GitHub Actions workflows to be manually triggered
This patch adds a 'workflow_dispatch' trigger to our three GitHub
Actions workflows. This allows us to trigger each workflow by navigating
to the repository's Actions tab, selecting the desired workflow, and
clicking on th 'Run workflow' button.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Minwoo Im [Fri, 27 Sep 2024 03:08:57 +0000 (12:08 +0900)]
engines/io_uring: Fix negative errno in io_u->error
io_u->error can have either negative errno value or device-specific
error status as a positive value. fio always tries to parse the errno
with strerrno() and it expects the value to be a positive one.
Commit
ebe67b667f25 ("io_uring: Add IO_U_F_DEVICE_ERRROR to identify
error types") tried to abs(io_u->error) to convert it first. And it
caused the following build warning:
engines/io_uring.c:553:16: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
io_u->error = abs(io_u->error);
^
engines/io_uring.c:553:16: note: remove the call to 'abs' since unsigned values cannot be negative
io_u->error = abs(io_u->error);
^~~
Commit
9eaa8e7c8e0b ("engines/io_uring: don't use abs() on an unsigned
value") tried to remove the warning by removing abs() on io_u->error,
but if so, negative errno (e.g., -EINVAL) can't be parsed properly like:
fio: io_u error on file /dev/ng0n1: Unknown error -22: write offset=
429916160, buflen=
1048576
This patch fixed this fixed to convert to positive value properly by
casting it first to int and then do abs() on it.
Fixes:
9eaa8e7c8e0b ("engines/io_uring: don't use abs() on an unsigned value")
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Link: https://lore.kernel.org/r/20240927030857.17001-1-minwoo.im.dev@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Minwoo Im [Thu, 26 Sep 2024 22:54:11 +0000 (07:54 +0900)]
HOWTO: update 'verify_mode' for io_uring_cmd
'verify_mode' option has been added by Commit
6170d92a61da
("io_uring: Support Compare command for verification"). Added
description for this option.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Link: https://lore.kernel.org/r/20240926225411.13754-1-minwoo.im.dev@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe [Thu, 26 Sep 2024 21:04:35 +0000 (15:04 -0600)]
engines/io_uring: don't use abs() on an unsigned value
It doesn't make any sense, for obvious reasons.
Fixes:
ebe67b667f25 ("io_uring: Add IO_U_F_DEVICE_ERROR to identify error types")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Thu, 26 Sep 2024 18:47:45 +0000 (14:47 -0400)]
Merge branch 'master' of https://github.com/HuangShumin/fio
* 'master' of https://github.com/HuangShumin/fio:
Fix configure with --build-static which enables static RDMA in #1801
Vincent Fu [Thu, 26 Sep 2024 18:43:48 +0000 (14:43 -0400)]
ci/cifuzz: update to upload-artifacts@v4
upload-artifacts v1 is now deprecated. Switch to a maintained version.
We may also consider just getting rid of this workflow as it's not clear
that it has ever found any issue or if anyone looks at the output.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Minwoo Im [Thu, 26 Sep 2024 01:08:02 +0000 (10:08 +0900)]
io_uring: Support Compare command for verification
Added 'verify_mode' option to io_uring_cmd with --cmd_type=nvme to
support data compare verification with Compare commands rather than Read
commands. This patch newly added IO_U_F_VER_IN_DEV io_u flag to
represent that verification should be done in device side, not the host
side to skip the actual verification phase in verify_io_u().
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Link: https://lore.kernel.org/r/20240926010802.27131-1-minwoo.im.dev@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Minwoo Im [Thu, 26 Sep 2024 00:41:34 +0000 (09:41 +0900)]
io_uring: Add IO_U_F_DEVICE_ERROR to identify error types
__io_u_log_error expects a positive value of io_u->error parsing it with
strerror() expecting it to be an errno. io_uring_cmd (cmd_type=nvme),
for example, has returned errno value as a positive value and
device-specific CQE status type and code as well.
Commit
78831c6b35c5 ("io_uring: Fix the flip to negative of CQE status")
has put the abs() to the cqe->res, and it caused confusions between the
actual CQE stauts and the system error value (errno). Now we have
Commit
2a13699a89dc ("io_uring: Add .errdetails to parse CQ status"),
meaning that io_uring_cmd ioengines will parse the actual value of
io_u->error value as CQE status value, so we should know if the value is
for CQE status or errno.
This patch added a flag IO_U_F_DEVICE_ERROR to io_u to represent if
io_u->error has device-specific error value, otherwise it's errno.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Link: https://lore.kernel.org/r/20240926004134.26004-1-minwoo.im.dev@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Vincent Fu [Fri, 6 Sep 2024 18:52:01 +0000 (18:52 +0000)]
ci: build and run a QEMU guest VM for testing
Since GitHub Actions' free runners now support nested virtualization,
let's create a guest VM image and use it to run some tests that cannot
be run directly via a GitHub Actions runner (because these runners do
not allow insertion of kernel modules).
This patch adds a workflow that runs nightly and:
- creates a Debian guest VM image using libguestfs
- builds QEMU
- starts the VM
- clones/builds fio on the VM
- runs the test
Separate instances of the job are spawned to run the following tests:
- basic io_uring_cmd
- NVMe protection information w/16-bit Guard PI
- NVMe PI 4096+16 w/64-bit Guard PI
- NVMe PI 4096+64 w/64-bit Guard PI
- FDP
- t/zbd/run-tests-against-nullb
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>