[PR #1437] [MERGED] Added atime and Corrected atime/mtime/ctime operations #1989

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1437
Author: @ggtakec
Created: 10/3/2020
Status: Merged
Merged: 10/4/2020
Merged by: @gaul

Base: masterHead: fix_stat_time


📝 Commits (1)

  • 4f5720e Added atime and Corrected atime/mtime/ctime operations

📊 Changes

8 files changed (+479 additions, -92 deletions)

View changed files

📝 src/cache.cpp (+12 -0)
📝 src/fdcache_entity.cpp (+116 -23)
📝 src/fdcache_entity.h (+9 -3)
📝 src/metaheader.cpp (+24 -10)
📝 src/metaheader.h (+1 -1)
📝 src/s3fs.cpp (+78 -34)
📝 test/integration-test-main.sh (+231 -21)
📝 test/test-utils.sh (+8 -0)

📄 Description

Relevant Issue (if applicable)

n/a

Details

Added access time (a time) just like a normal file system.

I also reviewed the atime/ctime/mtime update patterns and made them the same as regular filesystems.
(Currently, those update patterns are not the same as normal file operations.)

The test case has been modified and the update of atime/mtime/ctime is regulated as follows according to the command.

  • create file or touch
    update ctime, atime and mtime with same time value.
  • touch -a
    update ctime and atime with same time value, mtime is kept.
  • write file (ex. echo *** > file)
    update ctime and mtime with same time value, atime is kept.
  • update attributes (ex. chmod)
    update only ctime, atime and mtime are kept.
  • copy file with attributes (ex. cp -p **** ****)
    update only ctime, atime and mtime are kept.
  • move file (ex. mv **** ****)
    update only ctime, atime and mtime are kept.

This fix and current code do not support updating the stat time of the parent directory of the file which is updated.
Further consideration is needed to support this, and it can be difficult to achieve.
Because, if operating the file, PUT request etc will be called to update the parent directory(object), which causes problems with performance and the number of requests.


🔄 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/1437 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 10/3/2020 **Status:** ✅ Merged **Merged:** 10/4/2020 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix_stat_time` --- ### 📝 Commits (1) - [`4f5720e`](https://github.com/s3fs-fuse/s3fs-fuse/commit/4f5720e4cad961d0eb6bcbe6351f1c75eaf9550e) Added atime and Corrected atime/mtime/ctime operations ### 📊 Changes **8 files changed** (+479 additions, -92 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+12 -0) 📝 `src/fdcache_entity.cpp` (+116 -23) 📝 `src/fdcache_entity.h` (+9 -3) 📝 `src/metaheader.cpp` (+24 -10) 📝 `src/metaheader.h` (+1 -1) 📝 `src/s3fs.cpp` (+78 -34) 📝 `test/integration-test-main.sh` (+231 -21) 📝 `test/test-utils.sh` (+8 -0) </details> ### 📄 Description ### Relevant Issue (if applicable) n/a ### Details Added access time (a time) just like a normal file system. I also reviewed the atime/ctime/mtime update patterns and made them the same as regular filesystems. (Currently, those update patterns are not the same as normal file operations.) The test case has been modified and the update of atime/mtime/ctime is regulated as follows according to the command. - create file or `touch` update ctime, atime and mtime with same time value. - `touch -a` update ctime and atime with same time value, mtime is kept. - write file (ex. `echo *** > file`) update ctime and mtime with same time value, atime is kept. - update attributes (ex. `chmod`) update only ctime, atime and mtime are kept. - copy file with attributes (ex. `cp -p **** ****`) update only ctime, atime and mtime are kept. - move file (ex. `mv **** ****`) update only ctime, atime and mtime are kept. _This fix and current code do not support updating the stat time of the parent directory of the file which is updated._ _Further consideration is needed to support this, and it can be difficult to achieve._ _Because, if operating the file, PUT request etc will be called to update the parent directory(object), which causes problems with performance and the number of requests._ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:03:08 +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#1989
No description provided.