-
Notifications
You must be signed in to change notification settings - Fork 234
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
More small locking fixes #1430
Merged
vrothberg
merged 6 commits into
containers:main
from
mtrmac:locking-fixes-will-this-ever-end
Nov 14, 2022
Merged
More small locking fixes #1430
vrothberg
merged 6 commits into
containers:main
from
mtrmac:locking-fixes-will-this-ever-end
Nov 14, 2022
Conversation
This file contains 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
This could, hypothetically, make the functions readers that are safe to use concurrently with other readers. Well, except for the SetBigData call... So it's just a microoptimization. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
It requires a WRITE lock. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
It requires a WRITE lock. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This makes the functions pure readers that can be used concurrently with other readers. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Move the createMappedLayer logic completely inside this function, to make it self-contained. Passing the rwImageStore will remove the need for a cast and clarify the logic. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
They don't, as the code assumes, test whether the store is writable; they return true for read-only stores as well. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
rhatdan
approved these changes
Nov 13, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@nalind @giuseppe @vrothberg @flouthoc @saschagrunert @umohnani8 PTAL
saschagrunert
approved these changes
Nov 14, 2022
vrothberg
approved these changes
Nov 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
BigDataDigests
andBigDataSizes
in methods that only have a read lock — either avoid that, or use a write lock*Grumble* I’m getting increasingly desperate for #1389 . Staring at locking code trying to not make a mistake feels like writing C memory allocation code manually — however good a human can get at it, machines do it faster, and they never get tired or inattentive.