[PR #2152] [MERGED] Fix two inconsistency issues between stat cache and cache file #2359

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2152
Author: @eryugey
Created: 4/26/2023
Status: Merged
Merged: 5/30/2023
Merged by: @ggtakec

Base: masterHead: dev


📝 Commits (2)

  • 3d98c9a Fix inconsistency between stat cache file and cache file
  • aafd256 Mark pagelist as unloaded if cache file has been truncated

📊 Changes

1 file changed (+16 additions, -7 deletions)

View changed files

📝 src/fdcache_entity.cpp (+16 -7)

📄 Description

Details

Mark pagelist as unloaded if cache file has been truncated

If cache file size doesn't match object size, the cache file might be
corrupted, so invalidate it and save new cache stat file.

Fix inconsistency between stat cache file and cache file

We unlock stat cache file too early in FdEntity::Open(), and would
truncate cache file and update stat cache file, so there's a window that
stat cache doesn't reflect cache file status.

🔄 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/2152 **Author:** [@eryugey](https://github.com/eryugey) **Created:** 4/26/2023 **Status:** ✅ Merged **Merged:** 5/30/2023 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `dev` --- ### 📝 Commits (2) - [`3d98c9a`](https://github.com/s3fs-fuse/s3fs-fuse/commit/3d98c9a40cdb9fb511793849e30c3102f1a05802) Fix inconsistency between stat cache file and cache file - [`aafd256`](https://github.com/s3fs-fuse/s3fs-fuse/commit/aafd256d680ca25378bbafa05d9723a5aae91936) Mark pagelist as unloaded if cache file has been truncated ### 📊 Changes **1 file changed** (+16 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache_entity.cpp` (+16 -7) </details> ### 📄 Description ### Details Mark pagelist as unloaded if cache file has been truncated If cache file size doesn't match object size, the cache file might be corrupted, so invalidate it and save new cache stat file. --- Fix inconsistency between stat cache file and cache file We unlock stat cache file too early in FdEntity::Open(), and would truncate cache file and update stat cache file, so there's a window that stat cache doesn't reflect cache file status. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:07 +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#2359
No description provided.