Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully populate layer records for mapped image top layers #1197

Merged
merged 1 commit into from Apr 13, 2022

Conversation

nalind
Copy link
Member

@nalind nalind commented Apr 12, 2022

When we create a copy of an image's top layer that's intended to be identical to the top layer, except for having some set of ID mappings already applied to it, copy over the template layer's compressed and uncompressed digest and size information, compression information, tar-split data, and lists of used UIDs and GIDs, if we have them.

The lack of sizing information was forcing ImageSize() to regenerate the diffs to determine the size of the mapped layers, which shouldn't have been necessary.

Teach the overlay DiffGetter to look for files in the diff directories of lower layers if we can't find them in the current layer, so that tar-split can retrieve content that we didn't have to pull up.

Fixes containers/podman#13755.

When we create a copy of an image's top layer that's intended to be
identical to the top layer, except for having some set of ID mappings
already applied to it, copy over the template layer's compressed and
uncompressed digest and size information, compression information,
tar-split data, and lists of used UIDs and GIDs, if we have them.

The lack of sizing information was forcing ImageSize() to regenerate the
diffs to determine the size of the mapped layers, which shouldn't have
been necessary.

Teach the overlay DiffGetter to look for files in the diff directories
of lower layers if we can't find them in the current layer, so that
tar-split can retrieve content that we didn't have to pull up.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@giuseppe PTAL

@rhatdan
Copy link
Member

rhatdan commented Apr 13, 2022

LGTM

@rhatdan rhatdan merged commit b3a57ab into containers:main Apr 13, 2022
@nalind nalind deleted the mapped-layer-sizes branch April 13, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running "podman images -a" is very slow
3 participants