From c8f3cca283d99760590fc17dbabbf4c3648a34c9 Mon Sep 17 00:00:00 2001 From: Andy Walsh Date: Mon, 11 Jan 2021 15:11:41 +0100 Subject: [PATCH] samba4: add proper io_uring kernel detection * add proper io_uring kernel detection Signed-off-by: Andy Walsh --- net/samba4/Makefile | 2 +- net/samba4/files/samba.init | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/net/samba4/Makefile b/net/samba4/Makefile index 7b983fd8c..ecdbdc913 100644 --- a/net/samba4/Makefile +++ b/net/samba4/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba PKG_VERSION:=4.13.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ diff --git a/net/samba4/files/samba.init b/net/samba4/files/samba.init index db4ce6c1b..3fd48d8cb 100644 --- a/net/samba4/files/samba.init +++ b/net/samba4/files/samba.init @@ -144,9 +144,14 @@ smb_add_share() { fi # always enable io_uring if we can - if [ "$DISABLE_ASYNC_IO" -ne 1 ] && [ -e /usr/lib/samba/vfs/io_uring.so ]; then + if [ "$DISABLE_ASYNC_IO" -ne 1 ] && [ -e /usr/lib/samba/vfs/io_uring.so ] && grep "io_uring_setup" /proc/kallsyms >>2 ; then + logger -p daemon.info -t 'samba4-server' "io_uring support found in kernel, enabling VFS io_uring." # make sure its last in list - vfs_objects="$vfs_objects io_uring" + if [ -n "$vfs_objects" ]; then + vfs_objects="$vfs_objects io_uring" + else + vfs_objects="io_uring" + fi fi [ -n "$vfs_objects" ] && printf "\tvfs objects = %s\n" "$vfs_objects"