aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_linux.go
diff options
context:
space:
mode:
authorMarios Titas2026-07-21 20:27:38 +0300
committerJakob Unterwurzacher2026-07-22 21:57:57 +0200
commit790362e8f8eabd1bdf75f98328daf94cf623c600 (patch)
treefcebc1fa556e8335a2fc0aef5df2bc573fd064d1 /internal/syscallcompat/sys_linux.go
parentb3b292a8a3c1478b769e213e0e590f38cb1b923c (diff)
fusefrontend: expose birth time via statxHEADmaster
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
Diffstat (limited to 'internal/syscallcompat/sys_linux.go')
-rw-r--r--internal/syscallcompat/sys_linux.go9
1 files changed, 9 insertions, 0 deletions
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) {