From ec609ea1311b29341b0cdd7c5d0bc67206d9bbb7 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Tue, 16 Apr 2024 02:52:37 +0100 Subject: [PATCH] F2FS. --- internal/util/alloc.go | 2 +- vfs/README.md | 5 +++++ vfs/os_f2fs_linux.go | 2 +- vfs/os_std_atomic.go | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/internal/util/alloc.go b/internal/util/alloc.go index 6bea7447..23c53823 100644 --- a/internal/util/alloc.go +++ b/internal/util/alloc.go @@ -54,7 +54,7 @@ func (m *mmappedMemory) Reallocate(size uint64) []byte { panic(err) } - // Update commited memory. + // Update committed memory. m.buf = m.buf[:new] } // Limit returned capacity because bytes beyond diff --git a/vfs/README.md b/vfs/README.md index 40bfbe56..58b3e9f0 100644 --- a/vfs/README.md +++ b/vfs/README.md @@ -66,6 +66,11 @@ with `EXCLUSIVE` locking mode you should disable connection pooling by calling You can use [`vfs.SupportsSharedMemory`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs#SupportsSharedMemory) to check if your platform supports shared memory. +### Batch-Atomic Write + +On 64-bit Linux, this module supports [batch-atomic writes](https://sqlite.org/cgi/src/technote/714) +on the F2FS filesystem. + ### Build tags The VFS can be customized with a few build tags: diff --git a/vfs/os_f2fs_linux.go b/vfs/os_f2fs_linux.go index 6e7ee774..a9f0e333 100644 --- a/vfs/os_f2fs_linux.go +++ b/vfs/os_f2fs_linux.go @@ -1,4 +1,4 @@ -//go:build (amd64 || arm64) && !sqlite3_nosys +//go:build (amd64 || arm64 || riscv64) && !sqlite3_nosys package vfs diff --git a/vfs/os_std_atomic.go b/vfs/os_std_atomic.go index 7a62ca51..ecaff024 100644 --- a/vfs/os_std_atomic.go +++ b/vfs/os_std_atomic.go @@ -1,4 +1,4 @@ -//go:build !linux || !(amd64 || arm64) || sqlite3_nosys +//go:build !linux || !(amd64 || arm64 || riscv64) || sqlite3_nosys package vfs