From 2d009083bae7682cbb6736e56b11269b71ee34e4 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 9 Apr 2025 19:27:58 +0300 Subject: [PATCH] core: Fix syscall VFS on Linux Fix the syscall VFS on Linux not to use `PlatformIO`, which is just an alias for `io_uring`. --- core/io/mod.rs | 4 ++++ core/lib.rs | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/io/mod.rs b/core/io/mod.rs index 7eb8845bb..b5321637b 100644 --- a/core/io/mod.rs +++ b/core/io/mod.rs @@ -191,6 +191,7 @@ cfg_block! { mod unix; #[cfg(feature = "fs")] pub use unix::UnixIO; + pub use unix::UnixIO as SyscallIO; pub use io_uring::UringIO as PlatformIO; } @@ -199,16 +200,19 @@ cfg_block! { #[cfg(feature = "fs")] pub use unix::UnixIO; pub use unix::UnixIO as PlatformIO; + pub use PlatformIO as SyscallIO; } #[cfg(target_os = "windows")] { mod windows; pub use windows::WindowsIO as PlatformIO; + pub use PlatformIO as SyscallIO; } #[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))] { mod generic; pub use generic::GenericIO as PlatformIO; + pub use PlatformIO as SyscallIO; } } diff --git a/core/lib.rs b/core/lib.rs index e827c3d0d..7ccfea4fe 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -31,7 +31,9 @@ use fallible_iterator::FallibleIterator; pub use io::UnixIO; #[cfg(all(feature = "fs", target_os = "linux", feature = "io_uring"))] pub use io::UringIO; -pub use io::{Buffer, Completion, File, MemoryIO, OpenFlags, PlatformIO, WriteCompletion, IO}; +pub use io::{ + Buffer, Completion, File, MemoryIO, OpenFlags, PlatformIO, SyscallIO, WriteCompletion, IO, +}; use limbo_ext::{ResultCode, VTabKind, VTabModuleImpl}; use limbo_sqlite3_parser::{ast, ast::Cmd, lexer::sql::Parser}; use parking_lot::RwLock; @@ -209,7 +211,7 @@ impl Database { Some(vfs) => vfs, None => match vfs.trim() { "memory" => Arc::new(MemoryIO::new()), - "syscall" => Arc::new(PlatformIO::new()?), + "syscall" => Arc::new(SyscallIO::new()?), #[cfg(all(target_os = "linux", feature = "io_uring"))] "io_uring" => Arc::new(UringIO::new()?), other => {