sync: fsync() file operands when no -d/-f flags (GNU MODE_FILE compat) - #14592
Open
lostallmymoney wants to merge 2 commits into
Open
lostallmymoney wants to merge 2 commits into
lostallmymoney wants to merge 2 commits into
Conversation
|
GNU testsuite comparison: |
oech3
reviewed
Sep 16, 2026
With file operands and no --data/-d or --file-system/-f flag, GNU sync enters MODE_FILE and fsync()s each operand. uutils instead falls through to a global sync(), silently ignoring the operands and blocking on every filesystem behind initramfs/dracut. Add an fsync(2) path (Linux/Android) mirroring do_fdatasync, and a regression test using /proc/self/mem which rejects fsync() with EINVAL (a global sync() would wrongly exit 0). Fixes: uutils#14591
Co-authored-by: oech3 <79379754+oech3@users.noreply.github.com>
lostallmymoney
force-pushed
the
fix-sync-fsync-file-operands
branch
from
September 16, 2026 19:09
bb3bc91 to
466fb2b
Compare
Author
|
I'm not an expert in github testing. Is the test failing because it's succeeding or is it really a lack of permissions ahah |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With file operands and no --data/-d or --file-system/-f flag, GNU sync enters MODE_FILE and fsync()s each operand. uutils instead falls through to a global sync(), silently ignoring the operands and blocking on every filesystem behind initramfs/dracut. Add an fsync(2) path (Linux/Android) mirroring do_fdatasync, and a regression test using /proc/self/mem which rejects fsync() with EINVAL (a global sync() would wrongly exit 0).
Fixes: #14591