[PR #2714] [MERGED] Changed to serialize CacheFileStat after flushing a file #2734

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2714
Author: @ggtakec
Created: 8/26/2025
Status: Merged
Merged: 8/26/2025
Merged by: @gaul

Base: masterHead: fix/page_serialize


📝 Commits (1)

  • 16c4160 Changed to serialize CacheFileStat after flushing a file

📊 Changes

1 file changed (+18 additions, -0 deletions)

View changed files

📝 src/fdcache_entity.cpp (+18 -0)

📄 Description

Relevant Issue (if applicable)

#2709 (#2710)

Details

The CacheFileStatus file(cache file stat information file) used to be updated when the cache file was closed, but we've changed it so that it also updates when the file is flushed.

The cause of bug #2709 appears to be as follows, so this can be worked around.

First, when updating a file, closing it, and reading the file's stat information, s3fs expects flush->relase to be called from FUSE, followed by getattr.

However, as previously(old) discussed, FUSE starts the next process without waiting for release to complete.
Presumably, this is why, in the case of bug #2709, the commands were called in the order flush->getattr->relase.

As a result, we've changed the CacheFileStatus file update, which previously only occurred on release, to now also occur on flush.


🔄 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/2714 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 8/26/2025 **Status:** ✅ Merged **Merged:** 8/26/2025 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix/page_serialize` --- ### 📝 Commits (1) - [`16c4160`](https://github.com/s3fs-fuse/s3fs-fuse/commit/16c416027c467a4253ac414876674ac766487aef) Changed to serialize CacheFileStat after flushing a file ### 📊 Changes **1 file changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache_entity.cpp` (+18 -0) </details> ### 📄 Description ### Relevant Issue (if applicable) #2709 (#2710) ### Details The CacheFileStatus file(cache file stat information file) used to be updated when the cache file was closed, but we've changed it so that it also updates when the file is flushed. The cause of bug #2709 appears to be as follows, so this can be worked around. First, when updating a file, closing it, and reading the file's stat information, s3fs expects flush->relase to be called from FUSE, followed by getattr. However, as previously(old) discussed, FUSE starts the next process without waiting for release to complete. Presumably, this is why, in the case of bug #2709, the commands were called in the order flush->getattr->relase. As a result, we've changed the CacheFileStatus file update, which previously only occurred on release, to now also occur on flush. --- <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: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#2734
No description provided.