Skip to content

Commit

Permalink
Merge branch 'taras/nfs-upstream' of https://github.com/tarasglek/fio-1
Browse files Browse the repository at this point in the history
* 'taras/nfs-upstream' of https://github.com/tarasglek/fio-1:
  clean up nfs example
  skip skeleton comments
  single line bodies
  C-style comments
  NFS configure fixes
  NFS engine
  • Loading branch information
axboe committed May 18, 2021
2 parents dfecde6 + c94b8f1 commit b54e0d8
Show file tree
Hide file tree
Showing 9 changed files with 404 additions and 1 deletion.
13 changes: 12 additions & 1 deletion HOWTO
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ I/O type

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

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

Expand Down Expand Up @@ -2103,6 +2103,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 @@ -2525,6 +2531,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
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,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
29 changes: 29 additions & 0 deletions configure
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit b54e0d8

Please sign in to comment.