mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2404] [MERGED] Fixed a bug in fdatasync(fsync) #2523
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#2523
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/2404
Author: @ggtakec
Created: 1/27/2024
Status: ✅ Merged
Merged: 2/6/2024
Merged by: @gaul
Base:
master← Head:fix_fdatasync📝 Commits (1)
5942adfFixed a bug in fdatasync(fsync)📊 Changes
4 files changed (+55 additions, -22 deletions)
View changed files
📝
src/fdcache_entity.cpp(+39 -4)📝
src/fdcache_entity.h(+3 -0)📝
src/s3fs.cpp(+11 -1)📝
test/integration-test-main.sh(+2 -17)📄 Description
Relevant Issue (if applicable)
#2376
#2198
Details
After merging #2376,
test_update_time_appendstarted to fail in the case ofmacos fuse-t, so it was fixed.The test failure is due to a different calling sequence from FUSE in using
macos fuse-t.In the case of
macos fuse-t,s3fs_fsync(a case ofdatasync) is called before callings3fs_flushwhen closing a file after updating or creating.In other words, a calling sequence is
open(create)->write->fdatasync->flush->release.Until now, there were no cases where
s3fs_fsyncwas called, causing problems with updating file metadata.Fixed so that when
s3fs_fsync(datasync) is called, the file content is not updated atflush, but only metadata can be updated.With this fix, most of required
sleepin test for macos, such as #2198, are no longer necessary.As @gaul feared, the test that required these
sleeps was probably caused by an issue on the s3fs side.In this PR, unnecessary
sleephas been removed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.