Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFS engine via libnfs #1216

Merged
merged 6 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion HOWTO
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ I/O type

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

tarasglek marked this conversation as resolved.
Show resolved Hide resolved
**2**
Alias for **both**.

Expand Down Expand Up @@ -2091,6 +2091,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 @@ -2508,6 +2514,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.
tarasglek marked this conversation as resolved.
Show resolved Hide resolved

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