mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2214] [MERGED] Fixed data race about fuse_fill_dir_t function and data pointer #2393
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#2393
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/2214
Author: @ggtakec
Created: 7/13/2023
Status: ✅ Merged
Merged: 7/14/2023
Merged by: @gaul
Base:
master← Head:fix_filler_datarace📝 Commits (1)
918cb78Fixed data race about fuse_fill_dir_t function and data pointer📊 Changes
1 file changed (+92 additions, -35 deletions)
View changed files
📝
src/s3fs.cpp(+92 -35)📄 Description
Relevant Issue (if applicable)
#2213 #2212
Details
In the thread callback handler for
HeadRequestcalled by FUSE readdir,void* bufandfuse_fill_dir_t fillerseem not suitable for asynchronous writes.I checked the FUSE source code, but it seems that exclusive control for
bufis not implemented byfiller.s3fs
HeadRequestsare processed in parallel by multithreading, so it seems that thisfillercall needs to be synchronized.However,
ThreadSanitizernever detected this part yet.(Even if exclusive control is performed in the
filler, I have decided that exclusive control on the s3fs side is not a particular problem, so I am submitting this PR.)This fix obsoletes
multi_head_callback_paramuses in threading functions and usesSyncFillerobjects instead.All data related to
fillerandbufare implemented inside theSyncFillerobject.(This includes
filledvariables added by #2212)SyncFillerobject handlesbuf/filler/filledsafely.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.