Commit 7fa15e28 authored by Xiaodong Liu's avatar Xiaodong Liu Committed by Jim Harris
Browse files

configure: add --with-fuse option



blobfs_bdev module may contain functions related to
FUSE which will utilize libfuse3.
By default, it is diabled to compile blobfs_bdev module
with FUSE related functions. Running './configure' with
option '--with-fuse' can enable it.

Change-Id: I6552a6c04cc3412c739691630a7a481e0ae6b59c
Signed-off-by: default avatarXiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470712


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent d7c00c17
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -81,6 +81,12 @@ Function spdk_blobfs_bdev_detect is added to detect whether blobfs exists on the

Function spdk_blobfs_bdev_create is added to create a blobfs on the given block device.

### build

Option to build FUSE components into blobfs_bdev module for mounting a blobfs filesystem.
It requires the installation of libfuse3. By default, it is disabled. And it will be
enabled if run `./configure` with `--with-fuse` option.

### nvme

Added `no_shn_notification` to NVMe controller initialization options, users can enable
+3 −0
Original line number Diff line number Diff line
@@ -153,3 +153,6 @@ CONFIG_URING=n

# Path to custom built IO_URING library
CONFIG_URING_PATH=

# Build with FUSE support
CONFIG_FUSE=n
+16 −0
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ function usage()
	echo "                           If an argument is provided, it is considered a directory containing"
	echo "                           liburing.a and io_uring.h. Otherwise the regular system paths will"
	echo "                           be searched."
	echo " fuse                      Build FUSE components for mounting a blobfs filesystem."
	echo "                           No path required."
	echo ""
	echo "Environment variables:"
	echo ""
@@ -355,6 +357,12 @@ for i in "$@"; do
			CONFIG[URING]=n
			CONFIG[URING_PATH]=
			;;
		--with-fuse)
			CONFIG[FUSE]=y
			;;
		--without-fuse)
			CONFIG[FUSE]=n
			;;
		--)
			break
			;;
@@ -693,6 +701,14 @@ if [[ "${CONFIG[URING]}" = "y" ]]; then
	fi
fi

if [[ "${CONFIG[FUSE]}" = "y" ]]; then
	if [[ ! -d /usr/include/fuse3 ]] && [[ ! -d /usr/local/include/fuse3 ]]; then
		echo "--with-fuse requires libfuse3."
		echo "Please install then re-run this script."
		exit 1
	fi
fi

# We are now ready to generate final configuration. But first do sanity
# check to see if all keys in CONFIG array have its reflection in CONFIG file.
if [ $(egrep -c "^\s*CONFIG_[[:alnum:]_]+=" $rootdir/CONFIG) -ne ${#CONFIG[@]} ]; then
+5 −0
Original line number Diff line number Diff line
@@ -55,4 +55,9 @@ endif
SYS_LIBS += -lufc
endif

# libfuse3 is required internally by blobfs_bdev
ifeq ($(CONFIG_FUSE),y)
LIBS+= -L/usr/local/lib -lfuse3
endif

include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
+5 −0
Original line number Diff line number Diff line
@@ -44,4 +44,9 @@ SPDK_LIB_LIST += event_bdev event_copy event_vmd
SPDK_LIB_LIST += bdev copy event thread util conf trace \
		log jsonrpc json rpc sock notify blobfs_bdev

# libfuse3 is required internally by blobfs_bdev
ifeq ($(CONFIG_FUSE),y)
LIBS+= -L/usr/local/lib -lfuse3
endif

include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
Loading