[PR #2637] [MERGED] Added backup variable for fdcache entity path #2681

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2637
Author: @ggtakec
Created: 1/21/2025
Status: Merged
Merged: 2/15/2025
Merged by: @ggtakec

Base: masterHead: add/var_method_for_path


📝 Commits (1)

  • 81926e1 Added backup variable for fdcache entity path

📊 Changes

2 files changed (+15 additions, -0 deletions)

View changed files

📝 src/fdcache_entity.cpp (+8 -0)
📝 src/fdcache_entity.h (+7 -0)

📄 Description

Relevant Issue (if applicable)

#2623

Details

This PR adds variables and methods for #2623.

To solve the problem of point out by #2623, the FdEntity::path variable needs to be available without locking for performance.
The FdEntity::path variable is protected by a lock(FdEntity::fdent_lock), but this lock is wide-ranging.
#2623 code should avoid this lock, but I propose this PR method instead of not locking.

I prepared a copy(backup for read only) variable of the FdEntity::path variable and prepared a lock(FdEntity::ro_path_lock) for only the FdEntity::ro_path variable.
This lock variable provides exclusive control only when the FdEntity::path variable is updated, so it provides the same functionality as not locking FdEntity::fdent_lock.
And I think the variable can be safely held.

@gaul
This process seems wasteful, but I think it is the best way to deal with #2623 at the moment.
Please give me your opinion.


🔄 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/2637 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 1/21/2025 **Status:** ✅ Merged **Merged:** 2/15/2025 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `add/var_method_for_path` --- ### 📝 Commits (1) - [`81926e1`](https://github.com/s3fs-fuse/s3fs-fuse/commit/81926e1c5cca6c506041031df60f2eef91e6ece6) Added backup variable for fdcache entity path ### 📊 Changes **2 files changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache_entity.cpp` (+8 -0) 📝 `src/fdcache_entity.h` (+7 -0) </details> ### 📄 Description ### Relevant Issue (if applicable) #2623 ### Details This PR adds variables and methods for #2623. To solve the problem of point out by #2623, the `FdEntity::path` variable needs to be available without locking for performance. The `FdEntity::path` variable is protected by a lock(`FdEntity::fdent_lock`), but this lock is wide-ranging. #2623 code should avoid this lock, but I propose this PR method instead of not locking. I prepared a copy(backup for read only) variable of the `FdEntity::path` variable and prepared a lock(`FdEntity::ro_path_lock`) for only the `FdEntity::ro_path` variable. This lock variable provides exclusive control only when the `FdEntity::path` variable is updated, so it provides the same functionality as not locking `FdEntity::fdent_lock`. And I think the variable can be safely held. @gaul This process seems wasteful, but I think it is the best way to deal with #2623 at the moment. Please give me your opinion. --- <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:46 +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#2681
No description provided.