mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1125] [MERGED] Fixed simple copy with nocpoyapi and modify flag in fdcache #1835
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#1835
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/1125
Author: @ggtakec
Created: 8/11/2019
Status: ✅ Merged
Merged: 8/11/2019
Merged by: @ggtakec
Base:
master← Head:fix_nocopyapi_copy📝 Commits (1)
f5bf41cFixed simple copy with nocpoyapi and modify flag in fdcache📊 Changes
3 files changed (+133 additions, -87 deletions)
View changed files
📝
src/fdcache.cpp(+106 -79)📝
src/fdcache.h(+15 -8)📝
test/integration-test-main.sh(+12 -0)📄 Description
Relevant Issue (if applicable)
#1098
Details
On OSX, when the nocopyapi option was specified, the simple cp command failed.
It was detected by adding a simple cp command with a test case.
Unlike writing to a file with dd, when using the cp command, a callback such as chmod is called.
During the write callback process, the chmod callback was called and the file size was not updated, causing a problem.
This problem was caused by overwriting the size when opening an existing fd with FdManager::Open().
In addition to this modification, this PR also deletes FdEntity::is_modify flag.
This is_modify flag which indicates cache modification, should not be managed by the FdEntity class(object), but by each element of FdEntity::pagelist.
In other words, add a modify flag to fdpage instead and manage modify status for individual fdpages.
As a result, there is a performance degradation for checking the modify state, but I believe it is insignificant.
This additional fix is the same as that included in the #1098 PR.
(#1098 PR will be rebased)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.