mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1063] [MERGED] Flush file when opening second fd #1784
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#1784
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/1063
Author: @gaul
Created: 7/2/2019
Status: ✅ Merged
Merged: 7/3/2019
Merged by: @ggtakec
Base:
master← Head:truncate-2nd-open-fd📝 Commits (1)
c596441Flush file when opening second fd📊 Changes
4 files changed (+24 additions, -8 deletions)
View changed files
📝
src/cache.cpp(+1 -1)📝
src/cache.h(+6 -6)📝
src/s3fs.cpp(+7 -1)📝
test/integration-test-main.sh(+10 -0)📄 Description
Previously when s3fs had dirty local data and an application opened a
second fd it would remove the stat cache entry, query S3 for the size
which was still zero, then reinitialize
FdEntrywith this incorrectsize. Instead flush local data to S3 so this query works. It is
possible that a more involved patch could do this with a less
heavyweight approach but this requires changing open. This does not
completely fix
git clonebut allows it to proceed further. Also makesome cache methods
const-correct. References #839.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.