mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2733] [MERGED] Changed file stat times(a/c/mtime) management #2753
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2753
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2733
Author: @ggtakec
Created: 10/1/2025
Status: ✅ Merged
Merged: 10/3/2025
Merged by: @gaul
Base:
master← Head:fix/file_time📝 Commits (1)
b7e69d4Changed file stat times(a/c/mtime) management📊 Changes
14 files changed (+672 additions, -520 deletions)
View changed files
📝
src/Makefile.am(+1 -0)📝
src/fdcache.cpp(+13 -5)📝
src/fdcache.h(+1 -1)📝
src/fdcache_auto.cpp(+2 -2)📝
src/fdcache_auto.h(+2 -1)📝
src/fdcache_entity.cpp(+84 -175)📝
src/fdcache_entity.h(+35 -35)➕
src/filetimes.cpp(+303 -0)➕
src/filetimes.h(+120 -0)📝
src/metaheader.cpp(+35 -47)📝
src/s3fs.cpp(+41 -90)📝
src/s3fs_util.cpp(+0 -118)📝
src/s3fs_util.h(+23 -38)📝
src/string_util.cpp(+12 -8)📄 Description
Relevant Issue (if applicable)
n/a
Details
I changed the way the stat time values(atime/ctime/mtime) for file objects are managed.
This was dicided after discovering a ctime related error in the
utimensat/02.tinpjdfstesttest, and this fix was addressing the cause and workaround.s3fs was substituting the stat time values(atime/ctime/mtime) of the cached file(or temporary file) for the stat time values during file operations.
However, this method could ultimately result in inconsistencies in the ctime value.
(Fixing this issue in the utimensat/02.t test would cause ctime-related errors in other tests.)
As a result, I decided to stop substituting the stat value of the cached file (or temporary file).
Instead, I now store the atime/ctime/mtime values in the file object's management class (FdEntity).
This change also reduced some of the complexity.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.