[PR #2016] [MERGED] Added the function to update mtime/ctime of the parent directory #2306

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2016
Author: @ggtakec
Created: 7/30/2022
Status: Merged
Merged: 2/12/2023
Merged by: @ggtakec

Base: masterHead: update_parentdir_stat


📝 Commits (1)

  • 1508d66 Added the function to update mtime/ctime of the parent directory

📊 Changes

6 files changed (+469 additions, -9 deletions)

View changed files

📝 doc/man/s3fs.1.in (+4 -0)
📝 src/fdcache_entity.h (+1 -0)
📝 src/s3fs.cpp (+186 -6)
📝 src/s3fs_help.cpp (+6 -0)
📝 test/integration-test-main.sh (+271 -2)
📝 test/small-integration-test.sh (+1 -1)

📄 Description

Relevant Issue (if applicable)

#1961 #1962 #1964 #2024

Details

This fix, the mtime/ctime of the parent directory is updated when the i-node of the parent directory is updated(create/delete files and directories, etc.).

The operation to update mtime/ctime in the parent directory is shown below:

Operation ctime/mtime
Create file/symbolic file/directory(touch, cp, ln -s, mkdir, etc) update
Rename file/symbolic file/directory(mv, etc) update
Update file/symbolic file/directory(touch, chmod, chown, chgrp`, etc) not update

I am adding a test(test_update_parent_directory_time) for the above pattern.

This fix will perform updating stats of the parent directory for each operation.
And this updating stats is enabled by default.
However, some users may not need this update stats process, and I have added the option disable_update_parent_dir_stat to suppress it.

This PR will resolve the issues in #1961 and #1962.
After #1964 will be merged, this branch will be rebased and release Draft.

This PR contains the same code as #1964.
(This is necessary and dependent it for conducting the test.)


🔄 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/2016 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 7/30/2022 **Status:** ✅ Merged **Merged:** 2/12/2023 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `update_parentdir_stat` --- ### 📝 Commits (1) - [`1508d66`](https://github.com/s3fs-fuse/s3fs-fuse/commit/1508d663b5c1eaf28a0d1ccd440042259ca29cb0) Added the function to update mtime/ctime of the parent directory ### 📊 Changes **6 files changed** (+469 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `doc/man/s3fs.1.in` (+4 -0) 📝 `src/fdcache_entity.h` (+1 -0) 📝 `src/s3fs.cpp` (+186 -6) 📝 `src/s3fs_help.cpp` (+6 -0) 📝 `test/integration-test-main.sh` (+271 -2) 📝 `test/small-integration-test.sh` (+1 -1) </details> ### 📄 Description ### Relevant Issue (if applicable) #1961 #1962 #1964 #2024 ### Details This fix, the `mtime`/`ctime` of the parent directory is updated when the `i-node` of the parent directory is updated(create/delete files and directories, etc.). The operation to update `mtime`/`ctime` in the parent directory is shown below: | Operation | ctime/mtime | | -------------------------------------------------------------------------- | ------------ | | Create file/symbolic file/directory(`touch`, `cp`, `ln -s`, `mkdir`, etc) | update | | Rename file/symbolic file/directory(`mv`, etc) | update | | Update file/symbolic file/directory(`touch`, `chmod`, `chown`, chgrp`, etc)| not update | I am adding a test(`test_update_parent_directory_time`) for the above pattern. This fix will perform updating stats of the parent directory for each operation. And this updating stats is enabled by default. However, some users may not need this update stats process, and I have added the option `disable_update_parent_dir_stat` to suppress it. This PR will resolve the issues in #1961 and #1962. After #1964 will be merged, this branch will be rebased and release Draft. This PR contains the same code as #1964. (This is necessary and dependent it for conducting the test.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:04:51 +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#2306
No description provided.