[PR #2674] [MERGED] Refactor StatCache truncate processing #2699

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2674
Author: @ggtakec
Created: 5/31/2025
Status: Merged
Merged: 6/8/2025
Merged by: @gaul

Base: masterHead: stat/01_truncate


📝 Commits (1)

  • 1e0e2cc Refactor StatCache truncate processing

📊 Changes

2 files changed (+157 additions, -134 deletions)

View changed files

📝 src/cache.cpp (+152 -130)
📝 src/cache.h (+5 -4)

📄 Description

Relevant Issue (if applicable)

n/a

Details

This PR is Phase 1 of fixes to refactor and improve StatCache.
(Subsequent PRs will follow based on this PR codes.)

  • Added a flag to the TruncateCache / TruncateSymlink arguments to truncate only when the size exceeds the limit.
  • Modified GetStat / IsNoObjectCache / AddStat / AddNoObjectCache / GetSymlink / AddSymlink / DelSymlinkHasLock to support the added flag.

🔄 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/2674 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 5/31/2025 **Status:** ✅ Merged **Merged:** 6/8/2025 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `stat/01_truncate` --- ### 📝 Commits (1) - [`1e0e2cc`](https://github.com/s3fs-fuse/s3fs-fuse/commit/1e0e2ccc79ef767d5f437c774c542a914f719ed7) Refactor StatCache truncate processing ### 📊 Changes **2 files changed** (+157 additions, -134 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+152 -130) 📝 `src/cache.h` (+5 -4) </details> ### 📄 Description ### Relevant Issue (if applicable) n/a ### Details This PR is Phase 1 of fixes to refactor and improve StatCache. (Subsequent PRs will follow based on this PR codes.) - Added a flag to the `TruncateCache` / `TruncateSymlink` arguments to truncate only when the size exceeds the limit. - Modified `GetStat` / `IsNoObjectCache` / `AddStat` / `AddNoObjectCache` / `GetSymlink` / `AddSymlink` / `DelSymlinkHasLock` to support the added flag. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:06: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#2699
No description provided.