From f03f9c9bde7067027f06e428faa29bf627659c28 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Fri, 30 May 2025 02:07:25 +0200 Subject: [PATCH] ZTS: Enable io_uring support on el9/el10 The io_uring interface is available as a Technology Preview. Details: https://access.redhat.com/solutions/4723221 Reviewed-by: Alexander Motin Reviewed-by: Tony Hutter Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Tino Reichardt Closes #17397 --- .github/workflows/scripts/qemu-6-tests.sh | 7 ++++++ .../direct/dio_async_fio_ioengines.ksh | 25 ++++--------------- .../tests/functional/io/io_uring.ksh | 7 ------ 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/scripts/qemu-6-tests.sh b/.github/workflows/scripts/qemu-6-tests.sh index 0115f4114..7528a1b9a 100755 --- a/.github/workflows/scripts/qemu-6-tests.sh +++ b/.github/workflows/scripts/qemu-6-tests.sh @@ -93,6 +93,13 @@ case "$1" in ;; esac +# enable io_uring on el9/el10 +case "$1" in + almalinux9|almalinux10) + sudo sysctl kernel.io_uring_disabled=0 > /dev/null + ;; +esac + # run functional testings and save exitcode cd /var/tmp TAGS=$2/$3 diff --git a/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh b/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh index 707dfeebd..caeb3ad90 100755 --- a/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh +++ b/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh @@ -65,26 +65,11 @@ fio_async_ioengines="posixaio" if is_linux; then fio_async_ioengines+=" libaio" if $(grep -q "CONFIG_IO_URING=y" /boot/config-$(uname -r)); then - if [ -e /etc/os-release ] ; then - source /etc/os-release - if [ $PLATFORM_ID = "platform:el9" ] ; then - log_note "io_uring disabled on RHEL 9 " \ - "variants: fails with " \ - "'Operation not permitted'" - elif $(check_fio_ioengine -eq 0); then - fio_async_ioengines+=" io_uring" - else - log_note "io_uring not supported by fio and " \ - "will not be tested" - fi - else - if $(check_fio_ioengine); then - fio_async_ioengines+=" io_uring" - - else - log_note "io_uring not supported by fio and " \ - "will not be tested" - fi + if $(check_fio_ioengine); then + fio_async_ioengines+=" io_uring" + else + log_note "io_uring not supported by fio and " \ + "will not be tested" fi else log_note "io_uring not supported by kernel will not " \ diff --git a/tests/zfs-tests/tests/functional/io/io_uring.ksh b/tests/zfs-tests/tests/functional/io/io_uring.ksh index 0b55eda01..0b477e104 100755 --- a/tests/zfs-tests/tests/functional/io/io_uring.ksh +++ b/tests/zfs-tests/tests/functional/io/io_uring.ksh @@ -45,13 +45,6 @@ if ! $(grep -q "CONFIG_IO_URING=y" /boot/config-$(uname -r)); then log_unsupported "Requires io_uring support within Kernel" fi -if [ -e /etc/os-release ] ; then - source /etc/os-release - if [ $PLATFORM_ID = "platform:el9" ]; then - log_unsupported "Disabled on RHEL 9 variants: fails with 'Operation not permitted'" - fi -fi - fio --ioengine=io_uring --parse-only || log_unsupported "fio io_uring support required" function cleanup