[PR #291] [MERGED] Issue #290: File opened with O_TRUNC is not flushed #1447

Closed
opened 2026-03-04 01:54:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/291
Author: @RobbKistler
Created: 11/4/2015
Status: Merged
Merged: 11/8/2015
Merged by: @ggtakec

Base: masterHead: truncate


📝 Commits (2)

  • a3ef5c8 Add file truncate test
  • dd7d926 Force flush in s3fs_open() if file is truncated.

📊 Changes

2 files changed (+30 additions, -0 deletions)

View changed files

📝 src/s3fs.cpp (+11 -0)
📝 test/integration-test-main.sh (+19 -0)

📄 Description

Test to repro Issue #290 and a potential fix.

I am not happy with the fix. O_TRUNC is common, and this adds an extra REST call for every open.

@ggtakec Is there a better way to mark the file as "dirty" so it will be uploaded when FUSE calls flush and release?


🔄 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/291 **Author:** [@RobbKistler](https://github.com/RobbKistler) **Created:** 11/4/2015 **Status:** ✅ Merged **Merged:** 11/8/2015 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `truncate` --- ### 📝 Commits (2) - [`a3ef5c8`](https://github.com/s3fs-fuse/s3fs-fuse/commit/a3ef5c820dde927dc416c69509e54f71e0643f6c) Add file truncate test - [`dd7d926`](https://github.com/s3fs-fuse/s3fs-fuse/commit/dd7d9268f20c0dd915e87b94f71836a9f286d288) Force flush in s3fs_open() if file is truncated. ### 📊 Changes **2 files changed** (+30 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/s3fs.cpp` (+11 -0) 📝 `test/integration-test-main.sh` (+19 -0) </details> ### 📄 Description Test to repro Issue #290 and a potential fix. I am not happy with the fix. O_TRUNC is common, and this adds an extra REST call for every open. @ggtakec Is there a better way to mark the file as "dirty" so it will be uploaded when FUSE calls flush and release? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:54:01 +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#1447
No description provided.