[PR #371] [MERGED] Always set stats cache for opened file #1484

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/371
Author: @ggtakec
Created: 3/13/2016
Status: Merged
Merged: 3/13/2016
Merged by: @ggtakec

Base: masterHead: master


📝 Commits (1)

  • 67efc11 Always set stats cache for opened file

📊 Changes

3 files changed (+63 additions, -11 deletions)

View changed files

📝 src/cache.cpp (+35 -3)
📝 src/cache.h (+6 -2)
📝 src/s3fs.cpp (+22 -6)

📄 Description

Fixed https://github.com/s3fs-fuse/s3fs-fuse/issues/370.

When copying a file(object), FUSE will call continuously s3fs_write evey 4KB(depending on the OS).
At this time FUSE will confirm the xattr of security.capability, if it is deemed necessary.
As a result, s3fs_getxattr will also be called in 64KB units.
And the HEAD request is sent to the S3 by evey s3fs_getxattr call, when s3fs is gave max_stat_cache_size=0 option or s3fs cached out the stats data for the file.
This causes a decrease in performance.

For solving this problem, s3fs is changed that the stats information for the file is always cached while the file is open.
After closing the file, the cache life depends on the setting of the max_stat_cache_size and it will be cleared.


🔄 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/371 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 3/13/2016 **Status:** ✅ Merged **Merged:** 3/13/2016 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`67efc11`](https://github.com/s3fs-fuse/s3fs-fuse/commit/67efc11d9494b65aad6412f20986b5a14e698695) Always set stats cache for opened file ### 📊 Changes **3 files changed** (+63 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+35 -3) 📝 `src/cache.h` (+6 -2) 📝 `src/s3fs.cpp` (+22 -6) </details> ### 📄 Description Fixed https://github.com/s3fs-fuse/s3fs-fuse/issues/370. When copying a file(object), FUSE will call continuously s3fs_write evey 4KB(depending on the OS). At this time FUSE will confirm the xattr of security.capability, if it is deemed necessary. As a result, s3fs_getxattr will also be called in 64KB units. And the HEAD request is sent to the S3 by evey s3fs_getxattr call, when s3fs is gave max_stat_cache_size=0 option or s3fs cached out the stats data for the file. This causes a decrease in performance. For solving this problem, s3fs is changed that the stats information for the file is always cached while the file is open. After closing the file, the cache life depends on the setting of the max_stat_cache_size and it will be cleared. --- <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:11 +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#1484
No description provided.