[PR #2733] [MERGED] Changed file stat times(a/c/mtime) management #2753

Closed
opened 2026-03-04 02:07:07 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: fix/file_time


📝 Commits (1)

  • b7e69d4 Changed 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.t in pjdfstest test, 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.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2733 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 10/1/2025 **Status:** ✅ Merged **Merged:** 10/3/2025 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix/file_time` --- ### 📝 Commits (1) - [`b7e69d4`](https://github.com/s3fs-fuse/s3fs-fuse/commit/b7e69d4cb12ef4a67f0117c640456903fa43de2f) Changed file stat times(a/c/mtime) management ### 📊 Changes **14 files changed** (+672 additions, -520 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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.t` in `pjdfstest` test, 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:07:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2753
No description provided.