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

chunked: add fuzzing tests for the cache #1963

Merged
merged 6 commits into from
Jun 10, 2024

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Jun 9, 2024

and fix some issues found with the new tests.

Copy link
Contributor

openshift-ci bot commented Jun 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jun 9, 2024
@cgwalters
Copy link
Contributor

I was unaware of this whole subsystem until now. This is the thing keeping indicies of chunks that are used for inside-a-file partial pulls?

The changes seem sane superficially.

@giuseppe
Copy link
Member Author

giuseppe commented Jun 9, 2024

I was unaware of this whole subsystem until now. This is the thing keeping indicies of chunks that are used for inside-a-file partial pulls?

yes, this is needed to avoid parsing the json metadata files each time we lookup for a digest. In the same cache file we store the files payload digest, the chunks digest and the hard link fingerprint. The hard link fingerprint a digest that is used to find files that can be used for hard links deduplication (payload digest + UID + GID + mode + xattrs).

pkg/chunked/cache_linux.go Outdated Show resolved Hide resolved
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
just a sanity check to deal with corrupted cache files

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Jun 10, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 10, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 0fbaf24 into containers:main Jun 10, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants