[PR #304] [MERGED] Fixed a bug about mtime - #299 #1451

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/304
Author: @ggtakec
Created: 11/29/2015
Status: Merged
Merged: 11/29/2015
Merged by: @ggtakec

Base: masterHead: master


📝 Commits (4)

  • 730262f Merge pull request #212 from s3fs-fuse/master
  • e1de134 Merge branch 'master' into macosx
  • 8ffff5b Merge remote-tracking branch 'upstream/macosx'
  • 7b62de8 Fixed a bug about mtime - #299

📊 Changes

3 files changed (+17 additions, -17 deletions)

View changed files

📝 src/fdcache.cpp (+15 -15)
📝 src/fdcache.h (+1 -1)
📝 src/s3fs.cpp (+1 -1)

📄 Description

s3fs had a bug(#299) that was s3fs could not set mtime to the file when the file was created with specifying mtime.
The bug occurred only if you started s3fs without cache files(not specified use_case option).

FUSE calls create/utimens/flush interface for s3fs when the file is created with mtime.
But utimens interface does not have file descriptor.
s3fs should search a fd from file path which is opened local file(cache).
But s3fs did not search it when s3fs was run without use_cache option.
This patch fixed it.

Be careful following:
If a file is created with mtime by some clients at same time on s3fs without use_cache, probably mtime for the file will be undefined.
This result is the same as the file content is undefined, s3fs is not guaranteed.


🔄 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/304 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 11/29/2015 **Status:** ✅ Merged **Merged:** 11/29/2015 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`730262f`](https://github.com/s3fs-fuse/s3fs-fuse/commit/730262f000041fe0e7b951157e1bec8eab27147d) Merge pull request #212 from s3fs-fuse/master - [`e1de134`](https://github.com/s3fs-fuse/s3fs-fuse/commit/e1de134d94d0e32f2aa18aa51c1d411a32966883) Merge branch 'master' into macosx - [`8ffff5b`](https://github.com/s3fs-fuse/s3fs-fuse/commit/8ffff5ba96fe982ab08ede0528b552469ff1abac) Merge remote-tracking branch 'upstream/macosx' - [`7b62de8`](https://github.com/s3fs-fuse/s3fs-fuse/commit/7b62de80f6d838ee0fdf9d8f8b2628da57e298ee) Fixed a bug about mtime - #299 ### 📊 Changes **3 files changed** (+17 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache.cpp` (+15 -15) 📝 `src/fdcache.h` (+1 -1) 📝 `src/s3fs.cpp` (+1 -1) </details> ### 📄 Description s3fs had a bug(#299) that was s3fs could not set mtime to the file when the file was created with specifying mtime. The bug occurred only if you started s3fs without cache files(not specified use_case option). FUSE calls create/utimens/flush interface for s3fs when the file is created with mtime. But utimens interface does not have file descriptor. s3fs should search a fd from file path which is opened local file(cache). But s3fs did not search it when s3fs was run without use_cache option. This patch fixed it. Be careful following: If a file is created with mtime by some clients at same time on s3fs without use_cache, probably mtime for the file will be undefined. This result is the same as the file content is undefined, s3fs is not guaranteed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:54:02 +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#1451
No description provided.