[PR #2150] [MERGED] Corresponded to upload in case of calling release without flush #2355

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2150
Author: @ggtakec
Created: 4/16/2023
Status: Merged
Merged: 4/23/2023
Merged by: @ggtakec

Base: masterHead: without_flush


📝 Commits (1)

  • 84d55a8 Corresponded to upload in case of calling release without flush

📊 Changes

1 file changed (+31 additions, -18 deletions)

View changed files

📝 src/s3fs.cpp (+31 -18)

📄 Description

Relevant Issue (if applicable)

#2149

Details

This PR is additional logic against #2149.
#2149 has reported that s3fs_release is called without calling s3fs_flush hook when the mount directory exporting via NFS.

To accommodate this, when s3fs_release is called, s3fs intentionally upload the file if it is still in a modified state.
No file uploads are performed in case of s3fs_flush hook is called, so this additional processing has no impact outside of NFS(for now).
Not only NFS, but if this case occurs in the future, this countermeasure will be effective.

There are no additional test cases as the tests for this issue cannot be implemented with test cases.
Instead, I tried not calling the s3fs_flush function and it worked. (results were fine)


🔄 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/2150 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 4/16/2023 **Status:** ✅ Merged **Merged:** 4/23/2023 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `without_flush` --- ### 📝 Commits (1) - [`84d55a8`](https://github.com/s3fs-fuse/s3fs-fuse/commit/84d55a87fcbeba743fabed757020ccf8788fc30d) Corresponded to upload in case of calling release without flush ### 📊 Changes **1 file changed** (+31 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/s3fs.cpp` (+31 -18) </details> ### 📄 Description ### Relevant Issue (if applicable) #2149 ### Details This PR is additional logic against #2149. #2149 has reported that `s3fs_release` is called without calling `s3fs_flush` hook when the mount directory exporting via NFS. To accommodate this, when `s3fs_release` is called, s3fs intentionally upload the file if it is still in a modified state. No file uploads are performed in case of `s3fs_flush` hook is called, so this additional processing has no impact outside of NFS(for now). Not only NFS, but if this case occurs in the future, this countermeasure will be effective. There are no additional test cases as the tests for this issue cannot be implemented with test cases. Instead, I tried not calling the `s3fs_flush` function and it worked. (results were fine) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:06 +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#2355
No description provided.