diff options
| author | Marios Titas | 2026-07-21 20:27:38 +0300 |
|---|---|---|
| committer | Jakob Unterwurzacher | 2026-07-22 21:57:57 +0200 |
| commit | 790362e8f8eabd1bdf75f98328daf94cf623c600 (patch) | |
| tree | fcebc1fa556e8335a2fc0aef5df2bc573fd064d1 /internal/syscallcompat | |
| parent | b3b292a8a3c1478b769e213e0e590f38cb1b923c (diff) | |
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')
| -rw-r--r-- | internal/syscallcompat/sys_linux.go | 9 |
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) { |
