mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2637] [MERGED] Added backup variable for fdcache entity path #2681
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2681
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:add/var_method_for_path📝 Commits (1)
81926e1Added 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::pathvariable needs to be available without locking for performance.The
FdEntity::pathvariable 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::pathvariable and prepared a lock(FdEntity::ro_path_lock) for only theFdEntity::ro_pathvariable.This lock variable provides exclusive control only when the
FdEntity::pathvariable is updated, so it provides the same functionality as not lockingFdEntity::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.