Commit 958d196c authored by Indraneel M's avatar Indraneel M Committed by Ben Walker
Browse files

configure: uring bdev zoned support default enable



Enable zoned support by default when uring bdev is enabled.
Also introduce --without-uring-zns to disable zoned support when not
needed.

Signed-off-by: default avatarIndraneel M <Indraneel.Mukherjee@wdc.com>
Change-Id: Ief7a3d29bf9e0c95ede624164e49679e46f01251
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14589


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 87afc01e
Loading
Loading
Loading
Loading
+11 −14
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ function usage() {
	echo " --without-uring           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 " --with-uring-zns          Build I/O uring module with ZNS (zoned namespaces) support."
	echo " --without-uring-zns       Build I/O uring module without ZNS (zoned namespaces) support."
	echo " --with-openssl[=DIR]      Build OPENSSL with custom path. Otherwise the regular system paths will"
	echo "                           be searched."
	echo " --with-fuse               Build FUSE components for mounting a blobfs filesystem."
@@ -576,14 +576,15 @@ for i in "$@"; do
			;;
		--with-uring)
			CONFIG[URING]=y
			CONFIG[URING_ZNS]=y
			CONFIG[URING_PATH]=
			;;
		--without-uring)
			CONFIG[URING]=n
			CONFIG[URING_PATH]=
			;;
		--with-uring-zns)
			CONFIG[URING_ZNS]=y
		--without-uring-zns)
			CONFIG[URING_ZNS]=n
			;;
		--with-openssl=*)
			check_dir "$i"
@@ -1080,17 +1081,13 @@ if [[ "${CONFIG[URING]}" = "y" ]]; then
		echo "Please build and install then re-run this script."
		exit 1
	fi
fi

	# Support for Zoned devices is enabled by default for Uring bdev. Check appropriate support in kernel.
	if [[ "${CONFIG[URING_ZNS]}" = "y" ]]; then
	if [[ "${CONFIG[URING]}" = "n" ]]; then
		echo "--with-uring-zns requires --with-uring."
		exit 1
	fi
		if ! echo -e '#include<linux/blkzoned.h>\nint main(void) { return BLK_ZONE_REP_CAPACITY; }\n' \
			| "${BUILD_CMD[@]}" -c - 2> /dev/null; then
		echo "--with-uring-zns requires blkzoned.h (from kernel >= linux-5.9)."
		exit 1
			echo "Disabling Zoned NS support in Uring! Requires blkzoned.h from kernel >= linux-5.9."
			CONFIG[URING_ZNS]=n
		fi
	fi
fi

+2 −2
Original line number Diff line number Diff line
@@ -605,9 +605,9 @@ The user needs to configure SPDK to include io_uring support:

`configure --with-uring`

To enable uring bdev for ZNS devices use the following:
Support for zoned devices is enabled by default in uring bdev. It can be explicitly disabled as follows:

`configure --with-uring --with-uring-zns`
`configure --with-uring --without-uring-zns`

To create a uring bdev with given filename, bdev name and block size use the `bdev_uring_create` RPC.