From 790362e8f8eabd1bdf75f98328daf94cf623c600 Mon Sep 17 00:00:00 2001 From: Marios Titas Date: Tue, 21 Jul 2026 20:27:38 +0300 Subject: fusefrontend: expose birth time via statx Forward the backing filesystem's STATX_BTIME on Linux while preserving existing metadata translations and fallback behavior. On Linux 6.6 and newer, this allows statx consumers such as GNU stat to report birth time when the backing filesystem provides it. Older kernels and backing filesystems without birth-time support retain the existing behavior. No on-disk format change or migration is required. Reverse mode remains unchanged. Fixes #868. Related context: #732 --- internal/syscallcompat/sys_linux.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/syscallcompat') diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go index 2b8a6f7..ffa5a97 100644 --- a/internal/syscallcompat/sys_linux.go +++ b/internal/syscallcompat/sys_linux.go @@ -80,6 +80,15 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { return syscall.Mknodat(dirfd, path, mode, dev) } +// Statx wraps the Statx syscall. +// Retries on EINTR. +func Statx(dirfd int, path string, flags int, mask int, st *unix.Statx_t) (err error) { + err = retryEINTR(func() error { + return unix.Statx(dirfd, path, flags, mask, st) + }) + return err +} + // Dup3 wraps the Dup3 syscall. We want to use Dup3 rather than Dup2 because Dup2 // is not implemented on arm64. func Dup3(oldfd int, newfd int, flags int) (err error) { -- cgit v1.2.3