Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ikegami-t authored Jun 16, 2021
2 parents bc652a6 + a59b12d commit 2eeba2a
Show file tree
Hide file tree
Showing 53 changed files with 1,046 additions and 176 deletions.
2 changes: 1 addition & 1 deletion FIO-VERSION-GEN
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

GVF=FIO-VERSION-FILE
DEF_VER=fio-3.26
DEF_VER=fio-3.27

LF='
'
Expand Down
35 changes: 29 additions & 6 deletions HOWTO
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ Parameter types
* *Ti* -- means tebi (Ti) or 1024**4
* *Pi* -- means pebi (Pi) or 1024**5

For Zone Block Device Mode:
* *z* -- means Zone

With :option:`kb_base`\=1024 (the default), the unit prefixes are opposite
from those specified in the SI and IEC 80000-13 standards to provide
compatibility with old scripts. For example, 4k means 4096.
Expand Down Expand Up @@ -1172,7 +1175,7 @@ I/O type

**1**
Backward-compatible alias for **mixed**.

**2**
Alias for **both**.

Expand Down Expand Up @@ -1281,13 +1284,14 @@ I/O type
.. option:: offset=int

Start I/O at the provided offset in the file, given as either a fixed size in
bytes or a percentage. If a percentage is given, the generated offset will be
bytes, zones or a percentage. If a percentage is given, the generated offset will be
aligned to the minimum ``blocksize`` or to the value of ``offset_align`` if
provided. Data before the given offset will not be touched. This
effectively caps the file size at `real_size - offset`. Can be combined with
:option:`size` to constrain the start and end range of the I/O workload.
A percentage can be specified by a number between 1 and 100 followed by '%',
for example, ``offset=20%`` to specify 20%.
for example, ``offset=20%`` to specify 20%. In ZBD mode, value can be set as
number of zones using 'z'.

.. option:: offset_align=int

Expand All @@ -1304,7 +1308,8 @@ I/O type
intended to operate on a file in parallel disjoint segments, with even
spacing between the starting points. Percentages can be used for this option.
If a percentage is given, the generated offset will be aligned to the minimum
``blocksize`` or to the value of ``offset_align`` if provided.
``blocksize`` or to the value of ``offset_align`` if provided. In ZBD mode, value can
also be set as number of zones using 'z'.

.. option:: number_ios=int

Expand Down Expand Up @@ -1822,7 +1827,8 @@ I/O size
If this option is not specified, fio will use the full size of the given
files or devices. If the files do not exist, size must be given. It is also
possible to give size as a percentage between 1 and 100. If ``size=20%`` is
given, fio will use 20% of the full size of the given files or devices.
given, fio will use 20% of the full size of the given files or devices.
In ZBD mode, value can also be set as number of zones using 'z'.
Can be combined with :option:`offset` to constrain the start and end range
that I/O will be done within.

Expand Down Expand Up @@ -1856,7 +1862,8 @@ I/O size
.. option:: fill_device=bool, fill_fs=bool

Sets size to something really large and waits for ENOSPC (no space left on
device) as the terminating condition. Only makes sense with sequential
device) or EDQUOT (disk quota exceeded)
as the terminating condition. Only makes sense with sequential
write. For a read workload, the mount point will be filled first then I/O
started on the result. This option doesn't make sense if operating on a raw
device node, since the size of that is already known by the file system.
Expand Down Expand Up @@ -2100,6 +2107,12 @@ I/O engine
I/O engine supporting asynchronous read and write operations to the
DAOS File System (DFS) via libdfs.

**nfs**
I/O engine supporting asynchronous read and write operations to
NFS filesystems from userspace via libnfs. This is useful for
achieving higher concurrency and thus throughput than is possible
via kernel NFS.

I/O engine specific parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -2241,6 +2254,11 @@ with the caveat that when used on the command line, they must come after the
Set to 1 only when Direct Write to PMem from the remote host is possible.
Otherwise, set to 0.

.. option:: busy_wait_polling=bool : [librpma_*_server]

Set to 0 to wait for completion instead of busy-wait polling completion.
Default: 1.

.. option:: interface=str : [netsplice] [net]

The IP address of the network interface used to send or receive UDP
Expand Down Expand Up @@ -2517,6 +2535,11 @@ with the caveat that when used on the command line, they must come after the
Specificy a different object class for the dfs file.
Use DAOS container's object class by default.

.. option:: nfs_url=str : [nfs]

URL in libnfs format, eg nfs://<server|ipv4|ipv6>/path[?arg=val[&arg=val]*]
Refer to the libnfs README for more details.

I/O depth
~~~~~~~~~

Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ ifdef CONFIG_PDB
LDFLAGS += -fuse-ld=lld $(LINK_PDBFILE)
endif

# If clang, do not use builtin stpcpy as it breaks the build
ifeq ($(CC),clang)
FIO_CFLAGS += -fno-builtin-stpcpy
endif

ifdef CONFIG_GFIO
PROGS += gfio
endif
Expand Down Expand Up @@ -79,6 +84,12 @@ ifdef CONFIG_LIBNBD
ENGINES += nbd
endif

ifdef CONFIG_LIBNFS
CFLAGS += $(LIBNFS_CFLAGS)
LIBS += $(LIBNFS_LIBS)
SOURCE += engines/nfs.c
endif

ifdef CONFIG_64BIT
CPPFLAGS += -DBITS_PER_LONG=64
else ifdef CONFIG_32BIT
Expand Down
7 changes: 4 additions & 3 deletions backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static bool break_on_this_error(struct thread_data *td, enum fio_ddir ddir,
td_clear_error(td);
*retptr = 0;
return false;
} else if (td->o.fill_device && err == ENOSPC) {
} else if (td->o.fill_device && (err == ENOSPC || err == EDQUOT)) {
/*
* We expect to hit this error if
* fill_device option is set.
Expand Down Expand Up @@ -1105,7 +1105,7 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done)
if (td->trim_entries)
log_err("fio: %lu trim entries leaked?\n", td->trim_entries);

if (td->o.fill_device && td->error == ENOSPC) {
if (td->o.fill_device && (td->error == ENOSPC || td->error == EDQUOT)) {
td->error = 0;
fio_mark_td_terminate(td);
}
Expand All @@ -1120,7 +1120,8 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done)

if (i) {
ret = io_u_queued_complete(td, i);
if (td->o.fill_device && td->error == ENOSPC)
if (td->o.fill_device &&
(td->error == ENOSPC || td->error == EDQUOT))
td->error = 0;
}

Expand Down
4 changes: 4 additions & 0 deletions cconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ void convert_thread_options_to_cpu(struct thread_options *o,
o->zone_capacity = le64_to_cpu(top->zone_capacity);
o->zone_skip = le64_to_cpu(top->zone_skip);
o->zone_mode = le32_to_cpu(top->zone_mode);
o->max_open_zones = __le32_to_cpu(top->max_open_zones);
o->ignore_zone_limits = le32_to_cpu(top->ignore_zone_limits);
o->lockmem = le64_to_cpu(top->lockmem);
o->offset_increment_percent = le32_to_cpu(top->offset_increment_percent);
o->offset_increment = le64_to_cpu(top->offset_increment);
Expand Down Expand Up @@ -573,6 +575,8 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
top->zone_capacity = __cpu_to_le64(o->zone_capacity);
top->zone_skip = __cpu_to_le64(o->zone_skip);
top->zone_mode = __cpu_to_le32(o->zone_mode);
top->max_open_zones = __cpu_to_le32(o->max_open_zones);
top->ignore_zone_limits = cpu_to_le32(o->ignore_zone_limits);
top->lockmem = __cpu_to_le64(o->lockmem);
top->ddir_seq_add = __cpu_to_le64(o->ddir_seq_add);
top->file_size_low = __cpu_to_le64(o->file_size_low);
Expand Down
2 changes: 2 additions & 0 deletions ci/appveyor-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ case "${DISTRO}" in
pacman.exe --noconfirm -S \
mingw-w64-${PACKAGE_ARCH}-clang \
mingw-w64-${PACKAGE_ARCH}-cunit \
mingw-w64-${PACKAGE_ARCH}-toolchain \
mingw-w64-${PACKAGE_ARCH}-lld
pacman.exe -Q # List installed packages
;;
esac

Expand Down
31 changes: 30 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ check_min_lib_version() {
fi
: "${_feature:=${1}}"
if "${cross_prefix}"pkg-config --version > /dev/null 2>&1; then
if eval "echo \$$_feature" = "yes" ; then
if test "$(eval echo \"\$$_feature\")" = "yes" ; then
feature_not_found "$_feature" "$1 >= $2"
fi
else
Expand Down Expand Up @@ -170,6 +170,7 @@ disable_native="no"
march_set="no"
libiscsi="no"
libnbd="no"
libnfs="no"
libzbc=""
dfs=""
dynamic_engines="no"
Expand Down Expand Up @@ -241,6 +242,8 @@ for opt do
;;
--disable-tcmalloc) disable_tcmalloc="yes"
;;
--disable-nfs) disable_nfs="yes"
;;
--dynamic-libengines) dynamic_engines="yes"
;;
--disable-dfs) dfs="no"
Expand Down Expand Up @@ -271,8 +274,10 @@ if test "$show_help" = "yes" ; then
echo "--disable-rados Disable Rados support even if found"
echo "--disable-rbd Disable Rados Block Device even if found"
echo "--disable-http Disable HTTP support even if found"
echo "--disable-nfs Disable userspace NFS support even if found"
echo "--disable-gfapi Disable gfapi"
echo "--enable-libhdfs Enable hdfs support"
echo "--enable-libnfs Enable nfs support"
echo "--disable-lex Disable use of lex/yacc for math"
echo "--disable-pmem Disable pmem based engines even if found"
echo "--enable-lex Enable use of lex/yacc for math"
Expand Down Expand Up @@ -2277,6 +2282,21 @@ EOF
fi
print_config "DAOS File System (dfs) Engine" "$dfs"

##########################################
# Check if we have libnfs (for userspace nfs support).
if test "$disable_nfs" != "yes"; then
if $(pkg-config libnfs); then
libnfs="yes"
libnfs_cflags=$(pkg-config --cflags libnfs)
libnfs_libs=$(pkg-config --libs libnfs)
else
if test "$libnfs" = "yes" ; then
echo "libnfs" "Install libnfs"
fi
fi
fi
print_config "NFS engine" "$libnfs"

##########################################
# Check if we have lex/yacc available
yacc="no"
Expand Down Expand Up @@ -3101,6 +3121,9 @@ fi
if test "$dfs" = "yes" ; then
output_sym "CONFIG_DFS"
fi
if test "$libnfs" = "yes" ; then
output_sym "CONFIG_NFS"
fi
if test "$march_set" = "no" && test "$build_native" = "yes" ; then
output_sym "CONFIG_BUILD_NATIVE"
fi
Expand Down Expand Up @@ -3140,6 +3163,12 @@ if test "$libnbd" = "yes" ; then
echo "LIBNBD_CFLAGS=$libnbd_cflags" >> $config_host_mak
echo "LIBNBD_LIBS=$libnbd_libs" >> $config_host_mak
fi
if test "$libnfs" = "yes" ; then
output_sym "CONFIG_LIBNFS"
echo "CONFIG_LIBNFS=m" >> $config_host_mak
echo "LIBNFS_CFLAGS=$libnfs_cflags" >> $config_host_mak
echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak
fi
if test "$dynamic_engines" = "yes" ; then
output_sym "CONFIG_DYNAMIC_ENGINES"
fi
Expand Down
6 changes: 0 additions & 6 deletions engines/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,12 +728,6 @@ static int fio_ioring_init(struct thread_data *td)
struct ioring_data *ld;
struct thread_options *to = &td->o;

if (to->io_submit_mode == IO_MODE_OFFLOAD) {
log_err("fio: io_submit_mode=offload is not compatible (or "
"useful) with io_uring\n");
return 1;
}

/* sqthread submission requires registered files */
if (o->sqpoll_thread)
o->registerfiles = 1;
Expand Down
Loading

0 comments on commit 2eeba2a

Please sign in to comment.