Skip to content

fsimpl/gofer/tmpfs: Support statx btime#13290

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl921686588
Open

fsimpl/gofer/tmpfs: Support statx btime#13290
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl921686588

Conversation

@copybara-service
Copy link
Copy Markdown

fsimpl/gofer/tmpfs: Support statx btime

gVisor did not report valid statx btime: gofer/directfs used fstat(2), which has no btime, and tmpfs did not track creation time.

Use host statx(AT_EMPTY_PATH) for gofer/directfs metadata. Restrict host statx in gofer/sandbox seccomp filters to FD-only calls using a fixed empty path and AT_EMPTY_PATH.

Track optional STATX_BTIME availability so filesystems without btime support do not expose zero btime. For tmpfs, initialize btime at inode creation and report STATX_BTIME, matching Linux >= 5.18.

Reference: fs/stat.c:vfs_statx(), mm/shmem.c:shmem_getattr()

Co-authored-by: Ayush Ranjan ayushranjan@google.com
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13038 from tanyifeng:fsimpl-statx-btime 4c56998

gVisor did not report valid statx btime: gofer/directfs used fstat(2), which has no btime, and tmpfs did not track creation time.

Use host statx(AT_EMPTY_PATH) for gofer/directfs metadata. Restrict host statx in gofer/sandbox seccomp filters to FD-only calls using a fixed empty path and AT_EMPTY_PATH.

Track optional STATX_BTIME availability so filesystems without btime support do not expose zero btime. For tmpfs, initialize btime at inode creation and report STATX_BTIME, matching Linux >= 5.18.

Reference: fs/stat.c:vfs_statx(), mm/shmem.c:shmem_getattr()

Co-authored-by: Ayush Ranjan <ayushranjan@google.com>
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13038 from tanyifeng:fsimpl-statx-btime 4c56998
PiperOrigin-RevId: 921686588
@copybara-service copybara-service Bot added the exported Issue was exported automatically label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant