{{ message }}
Repository navigation
overlay: Skip copying file data on copy-up for O_TRUNC opens - #16073
Open
wikipika-modal wants to merge 2 commits into
Open
wikipika-modal wants to merge 2 commits into
wikipika-modal wants to merge 2 commits into
Conversation
Opening a lower regular file with O_TRUNC copied all of its data to the upper layer and then truncated the upper file to zero. Copy up metadata only in that case, as Linux's ovl_copy_up_flags() does. Assisted-by: Claude Code
wikipika-modal
force-pushed
the
jackie/upstream-otrunc-copyup
branch
from
October 20, 2026 21:06
821f067 to
aeca713
Compare
ayushr2
approved these changes
Oct 21, 2026
ayushr2
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this is elegant.
EtiennePerot
approved these changes
Oct 22, 2026
Collaborator
Assisted-by: Claude Code
This was referenced Oct 23, 2026
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.

copyUpis invoked for any lower-dir file opened with write bit, including O_TRUNC, which copies all metadata + data up to upper dir.We should not copy data, since O_TRUNC will zero it out anyway.
Assisted-by: Claude Code