[PR #1125] [MERGED] Fixed simple copy with nocpoyapi and modify flag in fdcache #1835

Closed
opened 2026-03-04 02:02:23 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: fix_nocopyapi_copy


📝 Commits (1)

  • f5bf41c Fixed 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.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/1125 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 8/11/2019 **Status:** ✅ Merged **Merged:** 8/11/2019 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `fix_nocopyapi_copy` --- ### 📝 Commits (1) - [`f5bf41c`](https://github.com/s3fs-fuse/s3fs-fuse/commit/f5bf41cf117e6dfc0d510348cdc1cc11817662ed) Fixed simple copy with nocpoyapi and modify flag in fdcache ### 📊 Changes **3 files changed** (+133 additions, -87 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache.cpp` (+106 -79) 📝 `src/fdcache.h` (+15 -8) 📝 `test/integration-test-main.sh` (+12 -0) </details> ### 📄 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:02:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1835
No description provided.