From d2257a2729a23c7b1f8b92c2ac7f0a0041d38f69 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 21 Oct 2021 14:41:40 -0700 Subject: [PATCH] Android: Add io_uring support This patch has been tested on a recent Android phone. Compilation of this patch has been verified as follows: NDK=/usr/lib/android-ndk export LIBS="-landroid" export UNAME=Android for ((i=23;i<=30;i++)); do echo "==== i = $i ====" export CC=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android${i}-clang [ -e "$CC" ] || continue ./configure && make -j$(nproc) fio || break done Signed-off-by: Bart Van Assche --- Makefile | 2 +- os/os-android.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f28c130a..4ae5a371 100644 --- a/Makefile +++ b/Makefile @@ -233,7 +233,7 @@ endif endif ifeq ($(CONFIG_TARGET_OS), Android) SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c profiles/tiobench.c \ - oslib/linux-dev-lookup.c + oslib/linux-dev-lookup.c engines/io_uring.c ifdef CONFIG_HAS_BLKZONED SOURCE += oslib/linux-blkzoned.c endif diff --git a/os/os-android.h b/os/os-android.h index 18eb39ce..10c51b83 100644 --- a/os/os-android.h +++ b/os/os-android.h @@ -309,4 +309,8 @@ static inline int fio_set_sched_idle(void) } #endif +#ifndef RWF_UNCACHED +#define RWF_UNCACHED 0x00000040 +#endif + #endif -- 2.25.1