mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1887] [MERGED] Fixed not to call Flush even if the file size is increased #2232
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#2232
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/1887
Author: @ggtakec
Created: 2/13/2022
Status: ✅ Merged
Merged: 2/15/2022
Merged by: @gaul
Base:
master← Head:truncate_optimize📝 Commits (2)
898dafcFixed not to call Flush even if the file size is increased424404aSeparated macos-specific processing with ifdef📊 Changes
3 files changed (+36 additions, -16 deletions)
View changed files
📝
src/fdcache.cpp(+5 -0)📝
src/fdcache_entity.cpp(+2 -2)📝
src/s3fs.cpp(+29 -14)📄 Description
Relevant Issue (if applicable)
#1875
Details
Changed s3fs_truncate function.
This change reduces the number of file uploads if the file size is changed.
On macos, I have found that the truncate call when "size=0" cannot reflect the file size.(This reason is not understood...)
To avoid this, only when "size=0", the flush method is called as before.
Other than that, I found a bug in FdEntity::Open() and fixed it.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
-Wshorten-64-to-32warnings #2402