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: Indraneel M <Indraneel.Mukherjee@wdc.com>
Change-Id: Ief7a3d29bf9e0c95ede624164e49679e46f01251
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14589
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Indraneel M 2022-09-21 11:19:45 +05:30 committed by Ben Walker
parent 87afc01e5a
commit 958d196c1d
2 changed files with 13 additions and 16 deletions

25
configure vendored
View File

@ -95,7 +95,7 @@ function usage() {
echo " --without-uring If an argument is provided, it is considered a directory containing" 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 " liburing.a and io_uring.h. Otherwise the regular system paths will"
echo " be searched." 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 " --with-openssl[=DIR] Build OPENSSL with custom path. Otherwise the regular system paths will"
echo " be searched." echo " be searched."
echo " --with-fuse Build FUSE components for mounting a blobfs filesystem." echo " --with-fuse Build FUSE components for mounting a blobfs filesystem."
@ -576,14 +576,15 @@ for i in "$@"; do
;; ;;
--with-uring) --with-uring)
CONFIG[URING]=y CONFIG[URING]=y
CONFIG[URING_ZNS]=y
CONFIG[URING_PATH]= CONFIG[URING_PATH]=
;; ;;
--without-uring) --without-uring)
CONFIG[URING]=n CONFIG[URING]=n
CONFIG[URING_PATH]= CONFIG[URING_PATH]=
;; ;;
--with-uring-zns) --without-uring-zns)
CONFIG[URING_ZNS]=y CONFIG[URING_ZNS]=n
;; ;;
--with-openssl=*) --with-openssl=*)
check_dir "$i" check_dir "$i"
@ -1080,17 +1081,13 @@ if [[ "${CONFIG[URING]}" = "y" ]]; then
echo "Please build and install then re-run this script." echo "Please build and install then re-run this script."
exit 1 exit 1
fi 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_ZNS]}" = "y" ]]; then if ! echo -e '#include<linux/blkzoned.h>\nint main(void) { return BLK_ZONE_REP_CAPACITY; }\n' \
if [[ "${CONFIG[URING]}" = "n" ]]; then | "${BUILD_CMD[@]}" -c - 2> /dev/null; then
echo "--with-uring-zns requires --with-uring." echo "Disabling Zoned NS support in Uring! Requires blkzoned.h from kernel >= linux-5.9."
exit 1 CONFIG[URING_ZNS]=n
fi 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
fi fi
fi fi

View File

@ -605,9 +605,9 @@ The user needs to configure SPDK to include io_uring support:
`configure --with-uring` `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. To create a uring bdev with given filename, bdev name and block size use the `bdev_uring_create` RPC.