fio.git
9 months agoRevert "rpma: add librpma_apm_* and librpma_gpspm_* engines"
Tomasz Gromadzki [Thu, 29 Aug 2024 11:55:27 +0000 (13:55 +0200)]
Revert "rpma: add librpma_apm_* and librpma_gpspm_* engines"

This reverts commit e4c4625ff8368f7667b2fe81cd2040186d440c94.

9 months agoRevert "rpma: RPMA engine requires librpma>=v0.10.0 with rpma_mr_advise()"
Tomasz Gromadzki [Thu, 29 Aug 2024 11:48:03 +0000 (13:48 +0200)]
Revert "rpma: RPMA engine requires librpma>=v0.10.0 with rpma_mr_advise()"

This reverts commit e662bc9815de906e3498f4261ec5a28481872a18.

9 months agoRevert "rpma: RPMA engines require librpma>=v0.11.0 with rpma_cq_get_wc()"
Tomasz Gromadzki [Thu, 29 Aug 2024 11:47:49 +0000 (13:47 +0200)]
Revert "rpma: RPMA engines require librpma>=v0.11.0 with rpma_cq_get_wc()"

This reverts commit d479658a965ac17ff213d7ba506116f822cb3219.

9 months agoRevert "rpma: simplify server_cmpl_process()"
Tomasz Gromadzki [Thu, 29 Aug 2024 11:47:36 +0000 (13:47 +0200)]
Revert "rpma: simplify server_cmpl_process()"

This reverts commit d3061c18e84c91a417f8832b1a7cc09b1d26d1ee.

9 months agoRevert "ci: build the librpma fio engine"
Tomasz Gromadzki [Thu, 29 Aug 2024 11:47:16 +0000 (13:47 +0200)]
Revert "ci: build the librpma fio engine"

This reverts commit 4e2bd713356cfc89ea6c898985c492af93b34a5d.

9 months agoci: add containers for Alma, Oracle, and Rocky Linux
Vincent Fu [Mon, 26 Aug 2024 18:27:28 +0000 (18:27 +0000)]
ci: add containers for Alma, Oracle, and Rocky Linux

Expand our testing platforms with these distributions. They mostly use
the same package names as Fedora with a handful of exceptions.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
9 months agoci: install updated bash on macOS platforms via workflow
Vincent Fu [Tue, 27 Aug 2024 14:37:02 +0000 (14:37 +0000)]
ci: install updated bash on macOS platforms via workflow

Our shell script for installing dependencies uses a feature that is only
available starting with bash 4. macOS ships with bash 3, so install bash
from homebrew in the GitHub Actions workflow when runing on macOS.
Previously we could install bash in our shell script for installing
dependencies but this depedencies install script now needs the bash 4
feature.

The feature in question is for bash to be able to match multiple
patterns in a case statement.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
9 months agoci: install isal packages for testing
Vincent Fu [Wed, 21 Aug 2024 20:31:46 +0000 (20:31 +0000)]
ci: install isal packages for testing

This brings in faster checksum calculation routines that are used for
protection information support.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
9 months agoci: run tests in containers
Vincent Fu [Wed, 7 Aug 2024 21:17:29 +0000 (21:17 +0000)]
ci: run tests in containers

This patch adds GitHub Actions tests that run in containers to support
running tests on Debian and Fedora. Ubuntu tests are also run in
containers.

The io_uring (t0018) and command priority (in latency_percentiles.py)
tests are not supported in containers, so the Ubuntu container tests
cannot replace the tests running directly on GitHub Actions Ubuntu
runners.

This is a single uncomfortably large patch because all of these changes
are required for the tests to pass.

Here is a list of changes:

ci.yml:
  add GitHub Actions jobs for the different containers
actions-build.sh:
  use bash found in PATH to pick up bash 4 installed on macOS because
    bash 4 is required to match multiple patterns in a case statement
  only enable cuda when running on Ubuntu because Debian does not have
    the cuda package by default
actions-full-test.sh:
  skip io_uring and cmdprio tests when running on containers because
    these features are not supported
actions-install.sh:
  install nvidia-cuda-dev only on Ubuntu because this is not available
    for Debian by default
  install additional packages when running on Debian and Ubuntu
    containers. These are already installed in the GHA image.
  install packages for Fedora
  install bash via homebrew on macOS to get bash v4

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
9 months agoci: remove arm64 case for tests
Vincent Fu [Mon, 19 Aug 2024 20:34:33 +0000 (20:34 +0000)]
ci: remove arm64 case for tests

We no longer run tests on arm64 platforms, so remove related part of the
shell script.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
9 months agoMerge branch 'errdetails' of https://github.com/minwooim/fio
Jens Axboe [Fri, 16 Aug 2024 14:21:20 +0000 (08:21 -0600)]
Merge branch 'errdetails' of https://github.com/minwooim/fio

* 'errdetails' of https://github.com/minwooim/fio:
  io_uring: Add .errdetails to parse CQ status
  ioengines: Add thread_data to .errdetails

9 months agoio_uring: Add .errdetails to parse CQ status
Minwoo Im [Thu, 15 Aug 2024 23:12:34 +0000 (08:12 +0900)]
io_uring: Add .errdetails to parse CQ status

Background
 - fio normally prints out the strerr and errno value when facing
   errors.  In case of io_uring_cmd ioengine with --cmd_type=nvme,
   io_u->error represents the CQ entry status code type and status
   code which should be parsed as a NVMe error value rather than
   errno.

In io_u error failure condition, it prints out parsed CQ entry error
status values with SCT(Status Code Type) and SC(Status Code).  The print
will be like the following example:

  fio: io_uring_cmd: /dev/ng0n1: cq entry status (sct=0x00; sc=0x04)

If --cmd_type!=nvme, it prints out generic status code like below:

  fio: io_uring_cmd: /dev/<devnode>: status=0x4

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
9 months agoioengines: Add thread_data to .errdetails
Minwoo Im [Thu, 15 Aug 2024 23:08:17 +0000 (08:08 +0900)]
ioengines: Add thread_data to .errdetails

No functional changes here, but added a 'struct thread_data *td' to the
errdetails callback.  This is a prep patch for the following commits to
access 'td->eo' instance from .errdetails callback.

Bump up FIO_IOOPS_VERSION to 36 since the previous commits updated
.errdetails callback for ioengines by adding 'thread_data' argument.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
10 months agoMerge branch 'master' of https://github.com/scaleoutsean/fio
Jens Axboe [Tue, 6 Aug 2024 15:17:03 +0000 (09:17 -0600)]
Merge branch 'master' of https://github.com/scaleoutsean/fio

* 'master' of https://github.com/scaleoutsean/fio:
  Improve http_host, filename in docs and example/http-s3.fio

10 months agoImprove http_host, filename in docs and example/http-s3.fio
Sean Lee [Tue, 6 Aug 2024 12:31:14 +0000 (20:31 +0800)]
Improve http_host, filename in docs and example/http-s3.fio

In fio.1 and HOWTO.rst:
  * http_host: add details on vHost- vs Path-style hostname
    differences
  * filename: add details on bucket prefix for Path-style hostname
In examples/http-s3.fio:
  * add comments at the top to clarify vHost vs Path S3 and change
    the hostname in existing example to disambiguate two scenarios

Signed-off-by: Sean Lee <sean.lee@netapp.com>
10 months agonvme/streams: avoid allocating too large a buffer
Vincent Fu [Mon, 5 Aug 2024 18:15:24 +0000 (18:15 +0000)]
nvme/streams: avoid allocating too large a buffer

We only need to allocate as many data structures as there were stream
IDs provided.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
10 months agoMerge branch 'qnx-phys-mem' of https://github.com/mvf/fio
Jens Axboe [Fri, 26 Jul 2024 13:56:01 +0000 (07:56 -0600)]
Merge branch 'qnx-phys-mem' of https://github.com/mvf/fio

* 'qnx-phys-mem' of https://github.com/mvf/fio:
  QNX: Fix physical memory detection

10 months agoQNX: Fix physical memory detection
Matthias von Faber [Fri, 26 Jul 2024 11:56:17 +0000 (13:56 +0200)]
QNX: Fix physical memory detection

On QNX 7.1, this was returning an uninitialized value due to failing
sysctl. Use the accumulated size of all "ram" areas from the asinfo
array in the syspage instead. Also fixes build on QNX 8.0.

Signed-off-by: Matthias von Faber <mvf@gmx.eu>
10 months agoMerge branch 'fdp/pid_limit_fix' of https://github.com/ankit-sam/fio
Vincent Fu [Wed, 17 Jul 2024 21:30:14 +0000 (17:30 -0400)]
Merge branch 'fdp/pid_limit_fix' of https://github.com/ankit-sam/fio

* 'fdp/pid_limit_fix' of https://github.com/ankit-sam/fio:
  ioengines: bump up FIO_IOOPS_VERSION
  dataplacement: change log_info to log_err for error messages
  dataplacement: remove FDP_MAX_RUHS

10 months agoioengines: bump up FIO_IOOPS_VERSION
Ankit Kumar [Wed, 17 Jul 2024 06:35:50 +0000 (12:05 +0530)]
ioengines: bump up FIO_IOOPS_VERSION

For fdp backend the way ruhs are fetched has been changed.
Earlier fdp_fetch_ruhs was called once with a buffer that can store
ruhs upto FDP_MAX_RUHS. The new fdp_fetch_ruhs is called twice. The
first call doesn't have any buffer for ruhs, and is only to get the
number of ruhs reported by the device. The second call has the buffer
that can store all the ruhs.

This impacts any external ioengines, so bump up FIO_IOOPS_VERSION.

Fixes: commit 56d12245 (dataplacement: update ruh info initialization)

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
10 months agodataplacement: change log_info to log_err for error messages
Ankit Kumar [Wed, 17 Jul 2024 14:10:03 +0000 (19:40 +0530)]
dataplacement: change log_info to log_err for error messages

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
10 months agodataplacement: remove FDP_MAX_RUHS
Ankit Kumar [Wed, 17 Jul 2024 05:57:27 +0000 (11:27 +0530)]
dataplacement: remove FDP_MAX_RUHS

Earlier fio used to have different limits on the max number of data
placement ID indices which user can pass, and the max number of ruhs
which can be stored. As during initialization we now fetch all the ruhs
from the device and then allocate buffer for the requested ones, there
is no need for FDP_MAX_RUHS.

Add missing error message if incorrect placement ID index is specified.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
10 months agot/nvmept_fdp: accommodate devices with many RUHS
Vincent Fu [Mon, 15 Jul 2024 18:47:18 +0000 (18:47 +0000)]
t/nvmept_fdp: accommodate devices with many RUHS

Fio can only accept 128 placement IDs to write to. It is possible for
namespaces to have thousands of placement IDs. Adjust the standard tests
to acommodate this situation. Instead of just assuming that the device
has fewer than 128 placement IDs, change the expected RUAMW calculations
to also work for the case where the namespace has more than 128
placement IDs exceeds 128.

Also adjust the scheme test to work where there are more RUHS than the
max scheme entries allowed.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
10 months agoengines/xnvme: allocate fdp ruhs buffer as per actual
Ankit Kumar [Mon, 15 Jul 2024 15:34:56 +0000 (21:04 +0530)]
engines/xnvme: allocate fdp ruhs buffer as per actual

Remove the restriction on maximum number of ruhs, fetch and fill the
ruhs buffer as requested by fdp backend.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
10 months agoengines/io_uring: fdp allocate ruhs buffer as per actual
Ankit Kumar [Mon, 15 Jul 2024 10:07:24 +0000 (15:37 +0530)]
engines/io_uring: fdp allocate ruhs buffer as per actual

Use calloc instead of scalloc as ruhs buffer allocation is temporary.
Remove the restriction on maximum number of ruhs, fetch and fill the
ruhs buffer as requested by fdp backend.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
10 months agodataplacement: update ruh info initialization
Ankit Kumar [Mon, 15 Jul 2024 08:21:04 +0000 (13:51 +0530)]
dataplacement: update ruh info initialization

The current way of initilization limits ruhs to 128. This commit
updates the way we fetch ruhs. We now fetch the ruhs info in two steps.
The first step only gets us the number of ruhs from the ioengine. This
is used by fdp backend to allocate the correct buffer size for the
second step, where we fetch the actual ruhs info. Fio no longer limits
the maximum number of ruhs for a device.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
[Vincent: edited commit message]

11 months agoos/os-qnx: fix overwrite of 'errno'
Jens Axboe [Fri, 12 Jul 2024 16:52:33 +0000 (10:52 -0600)]
os/os-qnx: fix overwrite of 'errno'

You can't call perror() and expect errno to retain the same value,
it'll be zero after that. On top of that, there's no reason to
print the error here, the higher up layers will do that when an error
is returned.

Fixes: 946733c6f19c ("Support QNX OS platform")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
11 months agoMerge branch 'master' of https://github.com/huangweiliang/fio_for_qnx
Jens Axboe [Fri, 12 Jul 2024 16:44:31 +0000 (10:44 -0600)]
Merge branch 'master' of https://github.com/huangweiliang/fio_for_qnx

* 'master' of https://github.com/huangweiliang/fio_for_qnx:
  Support QNX OS platform

11 months agoSupport QNX OS platform
Huang weiliang(weller) [Mon, 3 Jun 2024 22:37:54 +0000 (22:37 +0000)]
Support QNX OS platform

Compile command: QNX SDP7.1 example
./configure --cc=aarch64-unknown-nto-qnx7.1.0-gcc --disable-shm
make

Function is verified by UFS device read and write test.

Signed-off-by: Huang weiliang <weller.huang@us.bosch.com>
11 months agoMerge branch 'io-uring-cmd/nvme/add-flush' of https://github.com/minwooim/fio
Vincent Fu [Thu, 11 Jul 2024 13:59:48 +0000 (09:59 -0400)]
Merge branch 'io-uring-cmd/nvme/add-flush' of https://github.com/minwooim/fio

* 'io-uring-cmd/nvme/add-flush' of https://github.com/minwooim/fio:
  t/nvmept.py: Add test cases for FLUSH
  io_u: Support fsync for --rw=trimwrite
  io_u: Ensure fsync only after write(s)
  td: Replace last_was_sync with last_ddir_issued
  td: Rename last_ddir to last_ddir_completed
  io_uring: Add support FLUSH command

11 months agot/nvmept.py: Add test cases for FLUSH
Minwoo Im [Thu, 4 Jul 2024 14:09:12 +0000 (23:09 +0900)]
t/nvmept.py: Add test cases for FLUSH

This test script tests number of FLUSH commands triggered by --fsync=<N>
options to make FLUSH commands are followed by the WRITE commands from
the various --rw I/O workload.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
11 months agoio_u: Support fsync for --rw=trimwrite
Minwoo Im [Sat, 22 Jun 2024 15:30:03 +0000 (00:30 +0900)]
io_u: Support fsync for --rw=trimwrite

Even if ddir is determined in get_rw_ddir(), ddir might be updated in
set_rw_ddir().  if td represents trimwrite, it will be updated to either
DDIR_TRIM or DDIR_WRITE even ddir already represents for DDIR_SYNC.

To support DDIR_SYNC(fsync) for trimwrite, this patch checks ddir_sync()
in case of trimwrite not to update the pre-determined ddir.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
11 months agoio_u: Ensure fsync only after write(s)
Minwoo Im [Tue, 9 Jul 2024 22:50:14 +0000 (07:50 +0900)]
io_u: Ensure fsync only after write(s)

When using `--rw=write --fsync=N`, the FLUSH command is correctly
issued after N WRITE commands. However, if READ commands are mixed
in with --rw, fsync occurs after READ commands as well. This patch
ensures that fsync is only triggered after the specified number of
WRITE commands, regardless of READ commands.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
11 months agotd: Replace last_was_sync with last_ddir_issued
Minwoo Im [Tue, 9 Jul 2024 22:48:56 +0000 (07:48 +0900)]
td: Replace last_was_sync with last_ddir_issued

`last_was_sync` has represented that the last command had DDIR_SYNC.
This can be replaced with `ddir_sync(last_ddir_issued)` and it's much
more flexible to represent the last issued command's data direction.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
11 months agotd: Rename last_ddir to last_ddir_completed
Minwoo Im [Tue, 9 Jul 2024 22:45:04 +0000 (07:45 +0900)]
td: Rename last_ddir to last_ddir_completed

`last_ddir` represents the data direction of the latest completed
command.  To avoid confusions, this patch renamed `last_ddir` to
`last_ddir_completed` to make it much more clear.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
11 months agoio_uring: Add support FLUSH command
Minwoo Im [Sat, 22 Jun 2024 11:35:02 +0000 (20:35 +0900)]
io_uring: Add support FLUSH command

Add support for --fsync and --fdatasync in io_uring_cmd ioengine to
enable FLUSH commands just like libaio or io_uring ioengines.

If --fsync or --fdatasync is given N, FLUSH command will be issued as
per N write commands.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
11 months agowindows: don't define strtoll for 32-bit builds
Vincent Fu [Fri, 28 Jun 2024 22:12:09 +0000 (18:12 -0400)]
windows: don't define strtoll for 32-bit builds

Our 32-bit Windows Cygwin builds started failing because one of the
libraries they require now defines strtoll when fio already defines
strtoll. To avoid this, don't define strtoll for 32-bit Windows builds.

Failed build: https://github.com/axboe/fio/actions/runs/9718276970/job/26825784199

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agoMerge branch 'nfs' of https://github.com/panxiao2014/fio
Jens Axboe [Fri, 14 Jun 2024 12:19:28 +0000 (06:19 -0600)]
Merge branch 'nfs' of https://github.com/panxiao2014/fio

* 'nfs' of https://github.com/panxiao2014/fio:
  Fix issue when start randwrite by using nfs engine

12 months agoFix issue when start randwrite by using nfs engine
Pan Xiao [Fri, 14 Jun 2024 05:51:07 +0000 (13:51 +0800)]
Fix issue when start randwrite by using nfs engine

Use td_write(td) instead of td->o.td_ddir == TD_DDIR_WRITE
So fio will treat write and randwrite the same way when start jobs
by using NFS engine.

Pan Xiao <xiaopan@outlook.com>

12 months agosmalloc: add a comment explaining why scalloc does not zero memory
Vincent Fu [Wed, 12 Jun 2024 17:06:09 +0000 (13:06 -0400)]
smalloc: add a comment explaining why scalloc does not zero memory

scalloc does not zero out the buffer because this is already done
elsewhere. Explain this in a comment because this could be confusing.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agohelper_thread: check for null scalloc return value
Vincent Fu [Tue, 11 Jun 2024 20:19:38 +0000 (16:19 -0400)]
helper_thread: check for null scalloc return value

scalloc can return NULL if it fails to allocate memory. Check for this
condition and fail the helper thread setup if it occurs.

This issue was reported by Coverity:

** CID 496644:  Null pointer dereferences  (NULL_RETURNS)
/helper_thread.c: 425 in helper_thread_create()
419
420      hd = scalloc(1, sizeof(*hd));
421
422      setup_disk_util();
423      steadystate_setup();
424
>>>     CID 496644:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing "hd", which is known to be "NULL".
425      hd->sk_out = sk_out;

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agot/stest: remove useless error assignment
Vincent Fu [Tue, 11 Jun 2024 20:14:18 +0000 (16:14 -0400)]
t/stest: remove useless error assignment

Because the break statement breaks out of the while loop setting error
to true has no effect. So remove this useless assignment.

This issue was reported by Coverity:

** CID 496645:  Code maintainability issues  (UNUSED_VALUE)
/t/stest.c: 83 in do_rand_allocs()
77      flist_del(&e->list);
78      sfree(e);
79
80      if (!error) {
81      e = scalloc(1, LARGESMALLOC);
82      if (!e) {
>>>     CID 496645:  Code maintainability issues  (UNUSED_VALUE)
>>>     Assigning value "true" to "error" here, but that stored value is overwritten before it can be used.
83      error = true;
84      ret++;
85      printf("failure allocating %u bytes at %lu allocated during sfree phase\n",
86      LARGESMALLOC, total);
87      break;
88      }

Fixes: c6783fc3 ("t/stest: confirm that scalloc clears the buffer")
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agoiolog: check scalloc return value
Vincent Fu [Tue, 11 Jun 2024 20:09:00 +0000 (16:09 -0400)]
iolog: check scalloc return value

It is possible for scalloc to return NULL. setup_log() does not return a
value to indicate failure but we can use an assert here to check for a
NULL scalloc return value. This will trigger an exception similar to the
segfault that would happen if scalloc returns null, but this should
silence Coverity.

This was reported by Coverity:

** CID 496646:  Null pointer dereferences  (NULL_RETURNS)
/iolog.c: 843 in setup_log()

*** CID 496646:  Null pointer dereferences  (NULL_RETURNS)
/iolog.c: 843 in setup_log()
837      struct io_log *l;
838      int i;
839      struct io_u_plat_entry *entry;
840      struct flist_head *list;
841
842      l = scalloc(1, sizeof(*l));
>>>     CID 496646:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing "l", which is known to be "NULL".

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agot/stest: confirm that scalloc clears the buffer
Vincent Fu [Tue, 11 Jun 2024 17:54:56 +0000 (17:54 +0000)]
t/stest: confirm that scalloc clears the buffer

Change smalloc calls to scalloc and make sure buffers are zeroed out.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agoReapply "smalloc: smalloc() already clears memory, scalloc() need not do it again"
Vincent Fu [Tue, 11 Jun 2024 17:48:41 +0000 (17:48 +0000)]
Reapply "smalloc: smalloc() already clears memory, scalloc() need not do it again"

This reverts commit eb7fe4550ff2a569d0d8c71de16a1ea1e1aaf0a5.

It turns out that each buffer is in fact cleared in smalloc_pool() when
it is called by smalloc(). So there is no need to clear the buffer a
second time in scalloc.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agoengines/io_uring: eliminate FDP memory corruption risk
Vincent Fu [Fri, 7 Jun 2024 13:37:49 +0000 (09:37 -0400)]
engines/io_uring: eliminate FDP memory corruption risk

We only allocate FDP_MAX_RUHS reclaim unit handle status descriptors. It
is possible that the device will have more than this many descriptors.
Make sure we do not run over the end of the buffer we have allocated
when this happens.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agoRevert "smalloc: smalloc() already clears memory, scalloc() need not do it again"
Vincent Fu [Thu, 6 Jun 2024 17:57:47 +0000 (13:57 -0400)]
Revert "smalloc: smalloc() already clears memory, scalloc() need not do it again"

Originally:
smalloc cleared the buffer
scalloc did not need to clear the differ

Later: 9c3e13e3314da394698ca32f21cc46d46b7cfe47
smalloc was changed to not clear the buffer
scalloc was not updated to clear the buffer when the above smalloc
change was made

Originally smalloc always cleared the buffer. So it wasn't necessary for
scalloc to clear it again. But later on smalloc was changed to no longer
clear the buffer but scalloc was not changed back to clear the buffer.

Reverting this commit makes scalloc clear the buffer again.

This reverts commit a640ed36829f3be6d9dd8c7974dba41b9b59e6a5.

Fixes: https://github.com/axboe/fio/issues/1772
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agodataplacement: increase max data placement IDs to 128
Vincent Fu [Wed, 5 Jun 2024 15:19:51 +0000 (15:19 +0000)]
dataplacement: increase max data placement IDs to 128

Some users have requested the ability to test a larger number of
placement IDs in a single job. Bump the max placement IDs to 128.
Change the type to 16 bits to reduce the amount of space these
additional IDs will consume.

Also bump the server version for this change.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agodocs: update and clarify plids option
Vincent Fu [Mon, 3 Jun 2024 18:05:24 +0000 (18:05 +0000)]
docs: update and clarify plids option

Make it clearer that for FDP the values specified by the plids option
are indices referencing the list of placement identifiers available to
the namespace.

Also note that it now accepts ranges.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agot/nvmept_fdp: add tests for plid ranges
Vincent Fu [Mon, 3 Jun 2024 19:04:43 +0000 (19:04 +0000)]
t/nvmept_fdp: add tests for plid ranges

Add a few tests to make sure that parsing of ranges for placement ID
indices works.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agooptions: support ranges for FDP plids option
Vincent Fu [Thu, 30 May 2024 18:53:34 +0000 (18:53 +0000)]
options: support ranges for FDP plids option

Instead of forcing users to list every single placement ID, allow users
to specify a list of ranges (1-3, 4-6, 7, 8) for placement IDs.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agodocs: fix operations misspellings
Vincent Fu [Tue, 4 Jun 2024 12:53:07 +0000 (08:53 -0400)]
docs: fix operations misspellings

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
12 months agoMerge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio
Vincent Fu [Mon, 3 Jun 2024 14:17:38 +0000 (10:17 -0400)]
Merge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio

* 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio:
  io_uring: Add 'write_mode' option for optional cmds

12 months agoio_uring: Add 'write_mode' option for optional cmds
Minwoo Im [Tue, 28 May 2024 08:02:22 +0000 (17:02 +0900)]
io_uring: Add 'write_mode' option for optional cmds

Add a new option 'write_mode' to support additional optional Write
command family such as Write Uncorrectable and Write Zeroes in NVMe.
Since we have io_uring_cmd ioengine where we can define the actual
opcode of the command, this option will be used to test NVMe device with
various combination of Write command types.

'write_mode' option can be given either 'write', 'uncor', 'zeroes' or
'verify'.  'write' is for normal Write command which is by default,
'uncor' is for Write Uncorrectable, 'zeroes' for Write Zeroes and 'verify'
for Verify command  This should be used with DDIR_WRITE ddir.

This patch updates command's opcode in fio_ioring_init() to avoid
branches in the I/O hottest path giving opcode value to the
fio_nvme_uring_cmd_prep() as an argument.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
12 months agoMerge branch 'fix-coverity-scan-defect' of https://github.com/parkvibes/fio
Vincent Fu [Fri, 31 May 2024 13:46:59 +0000 (09:46 -0400)]
Merge branch 'fix-coverity-scan-defect' of https://github.com/parkvibes/fio

* 'fix-coverity-scan-defect' of https://github.com/parkvibes/fio:
  iolog: fix Error handling issues (NEGATIVE_RETURNS)
  iolog: fix Null pointer dereferences (FORWARD_NULL)

12 months agoiolog: fix Error handling issues (NEGATIVE_RETURNS)
Hyunwoo Park [Thu, 30 May 2024 02:48:57 +0000 (02:48 +0000)]
iolog: fix Error handling issues (NEGATIVE_RETURNS)

CID 494151: Error handling issues (NEGATIVE_RETURNS) @ io_u.c:1877 in get_io_u()
This patch removes negative returns from dp_init() to ensure
its value can be properly consumed by td_verror()

Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
12 months agoiolog: fix Null pointer dereferences (FORWARD_NULL)
Hyunwoo Park [Thu, 30 May 2024 02:15:05 +0000 (02:15 +0000)]
iolog: fix Null pointer dereferences (FORWARD_NULL)

CID 494150: Null pointer dereferences (FORWARD_NULL) @ iolog.c:148 in ipo_special()
This patch removes the possibility of null pointer dereferencing(io_u->file)
throughout the call stack of get_io_u() → read_iolog_get() → dp_fill_dspec_data()

Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
12 months agoMerge branch 'enable-dataplacement-while-replaying-io' of https://github.com/parkvibe...
Vincent Fu [Tue, 28 May 2024 18:19:19 +0000 (14:19 -0400)]
Merge branch 'enable-dataplacement-while-replaying-io' of https://github.com/parkvibes/fio

* 'enable-dataplacement-while-replaying-io' of https://github.com/parkvibes/fio:
  t/nvmept_fdp: add a test(402)
  fio: enable dataplacement(fdp) while replaying I/Os

12 months agoMerge branch 'io_uring/fix-negative-cqe-status' of https://github.com/minwooim/fio
Jens Axboe [Tue, 28 May 2024 15:57:04 +0000 (09:57 -0600)]
Merge branch 'io_uring/fix-negative-cqe-status' of https://github.com/minwooim/fio

* 'io_uring/fix-negative-cqe-status' of https://github.com/minwooim/fio:
  options: Add support hex value to ignore_error
  io_uring: Fix the flip to negative of CQE status

12 months agot/nvmept_fdp: add a test(402)
Hyunwoo Park [Mon, 27 May 2024 05:37:41 +0000 (05:37 +0000)]
t/nvmept_fdp: add a test(402)

A test(402) checks whether dataplacement(fdp) works fine while replaying iologs

Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
12 months agofio: enable dataplacement(fdp) while replaying I/Os
Hyunwoo Park [Thu, 23 May 2024 07:30:36 +0000 (07:30 +0000)]
fio: enable dataplacement(fdp) while replaying I/Os

Add initialization and dataplacement logic to enable
dataplacement(fdp) while fio replays I/Os with read_iolog.

Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
12 months agoMerge branch 'nvme/support-sync-fua-for-iouring-v2' of https://github.com/minwooim/fio
Vincent Fu [Fri, 24 May 2024 16:44:44 +0000 (12:44 -0400)]
Merge branch 'nvme/support-sync-fua-for-iouring-v2' of https://github.com/minwooim/fio

* 'nvme/support-sync-fua-for-iouring-v2' of https://github.com/minwooim/fio:
  io_uring: Add 'readfua' and 'writefua' options

12 months agoio_uring: Add 'readfua' and 'writefua' options
Minwoo Im [Tue, 14 May 2024 05:21:09 +0000 (14:21 +0900)]
io_uring: Add 'readfua' and 'writefua' options

Provide options to set the FUA flag in CDW12 in the NVMe command.  FUA
affects the internal operation of the NVMe controller and is used for
testing.  In this patchset we expand readfua and writefua options to
directly control FUA flag in io_uring_cmd engine.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
12 months agoMerge branch 'enable-dataplacement-scheme' of https://github.com/parkvibes/fio
Vincent Fu [Tue, 21 May 2024 18:06:32 +0000 (14:06 -0400)]
Merge branch 'enable-dataplacement-scheme' of https://github.com/parkvibes/fio

* 'enable-dataplacement-scheme' of https://github.com/parkvibes/fio:
  t/nvmept_fdp: add tests(302,303,400,401) for fdp scheme
  fdp: support scheme placement id (index) selection

12 months agot/nvmept_fdp: add tests(302,303,400,401) for fdp scheme
Hyunwoo Park [Thu, 9 May 2024 04:16:37 +0000 (04:16 +0000)]
t/nvmept_fdp: add tests(302,303,400,401) for fdp scheme

- 302/303: invalid options tests
- 400/401: check whether fdp scheme works properly

Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
12 months agofdp: support scheme placement id (index) selection
Hyunwoo Park [Tue, 30 Apr 2024 06:58:12 +0000 (06:58 +0000)]
fdp: support scheme placement id (index) selection

Add a new placement id selection method called scheme. It allows
users to assign a placement ID (index) depending on the offset range.
The strategy of the scheme is specified in the file by user and
is applicable using the option dp_scheme.

Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
13 months agooptions: Add support hex value to ignore_error
Minwoo Im [Wed, 15 May 2024 05:46:04 +0000 (14:46 +0900)]
options: Add support hex value to ignore_error

The 'ignore_error=str' option expects either the name or the numeric
value of the errno in string format.  With recent additions like
io_uring_cmd ioengine, it's been possible to check not only errno values
but also the actual status values provided by the storage device.

Given that most status codes in NVMe specs are represented in
hexadecimal, specifying error values in hexadecimal is also useful to
ignore some errors.

For example, DULBE (Deallocated or Unwritten Logical Block Error) status
code can be ignored:

ignore_error=0x287

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
13 months agoio_uring: Fix the flip to negative of CQE status
Minwoo Im [Wed, 15 May 2024 05:36:40 +0000 (14:36 +0900)]
io_uring: Fix the flip to negative of CQE status

Since cqe->res is expected to be a negative value of errno, it's been
flipped to a positive value before passing it to io_u.c.  However, in
case of io_uring_cmd with cmd_type=nvme, cqe->res might represent a NVMe
completion status type and code along with control fields such as DNR
since nvme_uring_cmd_end_io() in the NVMe driver sets the completion
status value and passes it up to io_uring.

For example, If a DULBE(Deallocated or Unwritten Logical Block Error)
is coming up from the device, cqe->res here would be 0x4287 which is a
DULBE error code of media error type.

This patch unified the error code to a positive value regardless of the
error type.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
13 months agot/zbd: avoid test case 31 failure with small devices
Shin'ichiro Kawasaki [Tue, 30 Apr 2024 10:30:22 +0000 (19:30 +0900)]
t/zbd: avoid test case 31 failure with small devices

The test case assumed that the test target devices have 128 or more
sequential write required zones and uses 128 as the minimum number of
zones to write. This caused failure when the devices had a smaller
number of sequential write required zones. To avoid the failure, count
the actual number of sequential write required zones and use it if it is
smaller than 128.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20240430103022.4136039-4-shinichiro.kawasaki@wdc.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agot/zbd: add test case to confirm verify_backlog=1 options
Shin'ichiro Kawasaki [Tue, 30 Apr 2024 10:30:21 +0000 (19:30 +0900)]
t/zbd: add test case to confirm verify_backlog=1 options

The previous commit fixed the verify failure due to the zone reset with
the verify_backlog option. Add a test to confirm the fix.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20240430103022.4136039-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agozbd: remove unnecessary verify_backlog check in zbd_file_reset()
Shin'ichiro Kawasaki [Tue, 30 Apr 2024 10:30:20 +0000 (19:30 +0900)]
zbd: remove unnecessary verify_backlog check in zbd_file_reset()

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>
Link: https://lore.kernel.org/r/20240430103022.4136039-2-shinichiro.kawasaki@wdc.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agot/nvmept_trim: increase transfer size for some tests
Vincent Fu [Thu, 25 Apr 2024 17:00:54 +0000 (13:00 -0400)]
t/nvmept_trim: increase transfer size for some tests

The final sequence of tests uses a block size of 4096 bytes. This can be
slow enough on some platforms to trigger a 10-minute timeout. Increase
the block size to 256K to reduce the run time.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agodocs: update for new data placement options
Vincent Fu [Wed, 17 Jan 2024 18:52:48 +0000 (18:52 +0000)]
docs: update for new data placement options

Update the HOWTO and man page for the unified data placement options
that cover both FDP and Streams.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agot/nvmept_streams: test NVMe streams support
Vincent Fu [Fri, 5 Jan 2024 18:04:10 +0000 (18:04 +0000)]
t/nvmept_streams: test NVMe streams support

This test script uses the io_uring pass-through ioengine to test NVMe
streams support.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agodataplacement: add a debug print for IOs
Vincent Fu [Thu, 4 Apr 2024 18:11:42 +0000 (18:11 +0000)]
dataplacement: add a debug print for IOs

This is useful for testing.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agooptions: parse placement IDs as unsigned values
Vincent Fu [Thu, 4 Apr 2024 16:46:21 +0000 (16:46 +0000)]
options: parse placement IDs as unsigned values

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agooptions: reject placement IDs larger than the max
Vincent Fu [Thu, 4 Apr 2024 16:40:03 +0000 (16:40 +0000)]
options: reject placement IDs larger than the max

Placement IDs are a 16-bit value. So we should notify users if the
provided placement IDs are too large.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agofio: support NVMe streams
Vincent Fu [Wed, 17 Jan 2024 15:19:07 +0000 (15:19 +0000)]
fio: support NVMe streams

Make small adjustments to the code supporting FDP to accommodate NVMe
streams.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agot/nvmept_fdp.py: test script for FDP
Vincent Fu [Tue, 9 Jan 2024 04:14:19 +0000 (04:14 +0000)]
t/nvmept_fdp.py: test script for FDP

This test script uses the io_uring pass-through ioengine to test fio's
FDP support. This uses both the orignal and the new fdp-related options.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agofio: create over-arching data placement option
Vincent Fu [Wed, 3 Jan 2024 20:16:19 +0000 (20:16 +0000)]
fio: create over-arching data placement option

Since FDP and streams are similar, we should have an over-arching data
placement option that encompasses both of these frameworks instead of
having separate sets of similar options for FDP and streams.

With a common set of options, users will be able to select the data
placement strategy (fdp or streams), the placement identifiers to use,
and the algorithm for selecting from the list of placement identifiers.

The original set of FDP options is retained for backward compatibility.

No functional change.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agofio: rename fdp.[c,h] to dataplacement.[c,h]
Vincent Fu [Thu, 18 Apr 2024 17:55:27 +0000 (17:55 +0000)]
fio: rename fdp.[c,h] to dataplacement.[c,h]

We can use code in the files to support NVMe streams.  Streams also
falls under the umbrella of data placement, so it seems reasonable to
put streams and FDP code in the same source files.

Also change the prefix of some functions from fdp_ to dp_ to indicate
that they are not specific to FDP but apply more generally to the two
data placement features.

No functional change.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agoMerge branch 'master' of https://github.com/celestinechen/fio
Jens Axboe [Fri, 19 Apr 2024 19:51:05 +0000 (13:51 -0600)]
Merge branch 'master' of https://github.com/celestinechen/fio

* 'master' of https://github.com/celestinechen/fio:
  FIO with fsync option issues more DDIR_SYNC commands than expected

13 months agoFIO with fsync option issues more DDIR_SYNC commands than expected
celestinechen [Fri, 19 Apr 2024 06:22:15 +0000 (06:22 +0000)]
FIO with fsync option issues more DDIR_SYNC commands than expected

Issue and root cause:
When fsync option is used, the number of flush (or DDIR_SYNC) commands
issued is more than the expected number of flush commands.
To elaborate:
- In the fio config file, consider fsync=1
1. FIO issues 1 write command
2. After write completes, FIO sets last_was_sync variable to false
3. FIO issues 1 flush command
4. FIO keeps issuing flush commands since last_was_sync is still false
and this causes more flush commands to be issued than expected
5. last_was_sync is set to true after the flush command completes
- The above steps repeats until the workload is completed.
Fix:
Instead of setting last_was_sync to true after flush command is completed
and setting last_was_sync to false after write command is completed,
set last_was_sync to true after flush command is issued and set
last_was_sync to false after write command is issued.

Signed-off-by: Celestine Chen celestinechen@google.com
13 months agofio: ioengine flag cleanup
Vincent Fu [Wed, 17 Apr 2024 17:51:30 +0000 (17:51 +0000)]
fio: ioengine flag cleanup

Convert how we define ioengine flags to use the same construction used
for thread flags. This allows us to count the number of ioengine flags
and write an assertion to ensure that thread flags and ioengine flags
fit inside td->flags.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agofio: remove compile time assertion
Vincent Fu [Wed, 17 Apr 2024 17:45:05 +0000 (17:45 +0000)]
fio: remove compile time assertion

TD_NR is the number of fio run states. It's not related to the number of
bits we need to shift ioengine flags in order to store them in
td->flags. Testing this assertion doesn't make sense.

Fixes: 9b87f09b ("fio: inherit IO engine flags to 'td'")
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agofio: use thread flag count for ioengine flag shift
Vincent Fu [Wed, 17 Apr 2024 15:37:24 +0000 (15:37 +0000)]
fio: use thread flag count for ioengine flag shift

We store the thread and ioengine flags in the same unsigned long long
with the ioengine flags bit shifted by the number of thread flags. In
the macros related to the bit shift, just use the count of the number of
thread flags. This way any time we change the number of thread flags the
required shift will be automatically updated.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agotest: add test for readwrite issue
Chana-Zaks-wdc [Thu, 18 Apr 2024 09:22:23 +0000 (12:22 +0300)]
test: add test for readwrite issue

test the previous commit: Don’t break too early in readwrite mode

In rw mode if io_size > size An early reset of the addresses occurred.
Make sure all addresses are done correctly.

Signed-off-by: Chana-Zaks-wdc <chana.zaks@wdc.com>
Link: https://lore.kernel.org/r/20240418092222.20543-3-chana.zaks@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
13 months agoDon break too early in readwrite mode
Chana-Zaks-wdc [Thu, 18 Apr 2024 09:22:22 +0000 (12:22 +0300)]
Don break too early in readwrite mode

In readwrite mode, when io-size > size, we break too early and start
looping the addresses too soon. Instead of reset the address when
reaching size, we start looping after size/2, e.g. in a 50/50 rw. This
wrong behavior is demonstrated in the example below.

Before the fix:
size is 0x140000, io-size is 0x280000, max-address = 0xa0000 = size / 2.

./fio --debug=io --name=global --filename=/dev/mmcblk0p3 --size=1280K
--io_size=2560k --bs=128K --offset=0   --name=test1 --rw=rw| grep "complete: io_u"

io 5646 complete: io_u 0x560337a20840: off=0x60000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x80000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x20000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x40000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x60000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0xa0000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x0,     len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x20000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x40000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x0,     len=0x20000, ddir=1, file=/dev/mmcblk0p3
Io 5646 complete: io_u 0x560337a20840: off=0x60000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x80000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x20000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x40000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0x60000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 5646 complete: io_u 0x560337a20840: off=0xa0000, len=0x20000, ddir=0, file=/dev/mmcblk0p3

After the fix max-address = 0x120000 = size – len:

io 32594 complete: io_u 0x70fc000980: off=0x0,     len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x20000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x40000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x0,     len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x60000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x80000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x20000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x40000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x60000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0xa0000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x80000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0xc0000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0xa0000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0xe0000, len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x100000,len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x120000,len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0xc0000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0xe0000, len=0x20000, ddir=1, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x0,     len=0x20000, ddir=0, file=/dev/mmcblk0p3
io 32594 complete: io_u 0x70fc000980: off=0x20000, len=0x20000, ddir=0, file=/dev/mmcblk0p3

Fixes: ac002339c382 (Fix bug with rw sequence offset and io_limit)
Signed-off-by: Chana-Zaks-wdc <chana.zaks@wdc.com>
Link: https://lore.kernel.org/r/20240418092222.20543-2-chana.zaks@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
13 months agot/io_uring: only calculate per-file depth if we have files
Jens Axboe [Wed, 17 Apr 2024 22:33:28 +0000 (16:33 -0600)]
t/io_uring: only calculate per-file depth if we have files

If NOPs are used, then no files exist, and hence the app will throw
a floating point error when trying to divide by zero.

Fixes: 6067863c7016 ("t/io_uring: pre-calculate per-file depth")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
13 months agogithub: add reminders to PR template
Vincent Fu [Wed, 17 Apr 2024 19:28:31 +0000 (15:28 -0400)]
github: add reminders to PR template

Remind contributors to bump the server version and ioengine ops version
when appropriate.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
13 months agoMerge branch 'ioops_ver' of https://github.com/ankit-sam/fio
Jens Axboe [Wed, 17 Apr 2024 16:04:10 +0000 (10:04 -0600)]
Merge branch 'ioops_ver' of https://github.com/ankit-sam/fio

* 'ioops_ver' of https://github.com/ankit-sam/fio:
  ioengines: bump up FIO_IOOPS_VERSION

13 months agoioengines: bump up FIO_IOOPS_VERSION
Ankit Kumar [Wed, 17 Apr 2024 23:44:33 +0000 (05:14 +0530)]
ioengines: bump up FIO_IOOPS_VERSION

This was left out when multi range trim support was added.
Fixes: commit b3251e31 (trim: add support for multiple ranges)

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
13 months agoMerge branch 'directory-operation' of https://github.com/friendy-su/fio
Vincent Fu [Tue, 16 Apr 2024 15:04:58 +0000 (11:04 -0400)]
Merge branch 'directory-operation' of https://github.com/friendy-su/fio

* 'directory-operation' of https://github.com/friendy-su/fio:
  engines/fileoperations: add more description for file/directory operation engines

13 months agoRevert "ioengines: Make td_io_queue print log_err when got error "
Jens Axboe [Mon, 15 Apr 2024 18:26:56 +0000 (12:26 -0600)]
Revert "ioengines: Make td_io_queue print log_err when got error "

We should not be making these error prints, they are purely
information, and in fact they should probably get deleted all
together.

For now, as this is actually breaking test frameworks, just revert
the change.

This reverts commit 3c826d1cafe6c703237378314bdcd123770971e3.

https://lore.kernel.org/fstests/20240415182231.GA2649469@mit.edu/
Reported-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
13 months agoengines/fileoperations: add more description for file/directory operation engines
friendy-su [Mon, 8 Apr 2024 09:22:47 +0000 (17:22 +0800)]
engines/fileoperations: add more description for file/directory operation engines

file/directory operations are quite different from I/O operation.
Add more description for how to configure the measurement
and how to utilize the data.

Signed-off-by: friendy-su <friendy.su@sony.com>
14 months agohowto: fix zonemode formatting
Vincent Fu [Tue, 2 Apr 2024 15:10:58 +0000 (11:10 -0400)]
howto: fix zonemode formatting

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
14 months agoFio 3.37 fio-3.37
Jens Axboe [Tue, 26 Mar 2024 21:13:51 +0000 (15:13 -0600)]
Fio 3.37

Signed-off-by: Jens Axboe <axboe@kernel.dk>
14 months agoMerge branch 'delete-instead-of-unlink' of https://github.com/edigaryev/fio
Jens Axboe [Mon, 25 Mar 2024 16:45:13 +0000 (10:45 -0600)]
Merge branch 'delete-instead-of-unlink' of https://github.com/edigaryev/fio

* 'delete-instead-of-unlink' of https://github.com/edigaryev/fio:
  docs: use "delete" term instead of "unlink", which is less common

14 months agodocs: use "delete" term instead of "unlink", which is less common
Nikolay Edigaryev [Mon, 25 Mar 2024 09:42:57 +0000 (13:42 +0400)]
docs: use "delete" term instead of "unlink", which is less common

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
14 months agoMerge branch 'issue-1735' of https://github.com/yygcode/fio
Vincent Fu [Fri, 22 Mar 2024 14:39:37 +0000 (10:39 -0400)]
Merge branch 'issue-1735' of https://github.com/yygcode/fio

* 'issue-1735' of https://github.com/yygcode/fio:
  iolog: fix disk stats issue