Handling of out-of-order whiteout files during tar expansion#1218
Merged
ambarve merged 4 commits intomicrosoft:masterfrom Nov 4, 2021
Merged
Handling of out-of-order whiteout files during tar expansion#1218ambarve merged 4 commits intomicrosoft:masterfrom
ambarve merged 4 commits intomicrosoft:masterfrom
Conversation
When extracting a container image layer tar, some files can show in an out of order fashion (i.e the file shows up first before its parent directory shows up). We already handle this by creating these parent directories if they don't already exist. However, that handling didn't apply to whiteout files. This commit fixes that. Signed-off-by: Amit Barve <ambarve@microsoft.com>
Signed-off-by: Amit Barve <ambarve@microsoft.com>
Signed-off-by: Amit Barve <ambarve@microsoft.com>
Signed-off-by: Amit Barve <ambarve@microsoft.com>
dcantah
reviewed
Nov 4, 2021
| // copy over existing xattrs first, we need to merge existing xattrs and the passed xattrs. | ||
| existingXattrs := make(map[string][]byte) | ||
| if len(node.XattrInline) > 0 { | ||
| getXattrs(node.XattrInline[4:], existingXattrs, 0) |
Contributor
There was a problem hiding this comment.
From 4 onwards to skip the header? (format.XAttrHeaderMagic)
dcantah
approved these changes
Nov 4, 2021
Contributor
dcantah
left a comment
There was a problem hiding this comment.
Small question, but lgtm! Make sure to squash
anmaxvl
pushed a commit
to anmaxvl/hcsshim
that referenced
this pull request
Nov 17, 2021
Related work items: microsoft#1067, microsoft#1097, microsoft#1119, microsoft#1170, microsoft#1176, microsoft#1180, microsoft#1181, microsoft#1182, microsoft#1183, microsoft#1184, microsoft#1185, microsoft#1186, microsoft#1187, microsoft#1188, microsoft#1189, microsoft#1191, microsoft#1193, microsoft#1194, microsoft#1195, microsoft#1196, microsoft#1197, microsoft#1200, microsoft#1201, microsoft#1202, microsoft#1203, microsoft#1204, microsoft#1205, microsoft#1206, microsoft#1207, microsoft#1209, microsoft#1210, microsoft#1211, microsoft#1218, microsoft#1219, microsoft#1220, microsoft#1223
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.
When extracting a container image layer tar, some files can show in an out of order
fashion (i.e the file shows up first before its parent directory shows up). We already
handle this by creating these parent directories if they don't already exist. However,
that handling didn't apply to whiteout files. This commit fixes that.
Signed-off-by: Amit Barve ambarve@microsoft.com