cls_lock: check expired lock before unlock#45762
Merged
yuriw merged 1 commit intoceph:masterfrom May 11, 2022
Merged
Conversation
badone
requested changes
Apr 13, 2022
Contributor
|
This looks like a good solution Nitzan, thanks! Just a nit regarding the function name typo. |
Check if the lock was expired, if it is, unlock will return -ENOENT and not 0 that will cause the assert to error. Fixes: https://tracker.ceph.com/issues/38357 Signed-off-by: Nitzan Mordechai <nmordec@redhat.com>
5c33e40 to
cf9054d
Compare
badone
approved these changes
Apr 13, 2022
Contributor
Author
14 tasks
k0ste
pushed a commit
to k0ste/ceph
that referenced
this pull request
Aug 19, 2024
If the lock expired, the stat check shouldn't return -ENOENT, We will change the lock duration to prevent lock expired before the stat check. Fixes: https://tracker.ceph.com/issues/56575 Signed-off-by: Nitzan Mordechai <nmordec@redhat.com> (cherry picked from commit d3457c6) Comment from @idryomov: There is a delta between the original commit and the backport and explained it - due to ceph#45762 [1] not getting backported anywhere (Rejected for octopus and pacific and still in New for quincy). [1] ceph#45762
k0ste
pushed a commit
to k0ste/ceph
that referenced
this pull request
Aug 19, 2024
If the lock expired, the stat check shouldn't return -ENOENT, We will change the lock duration to prevent lock expired before the stat check. Fixes: https://tracker.ceph.com/issues/56575 Signed-off-by: Nitzan Mordechai <nmordec@redhat.com> (cherry picked from commit d3457c6) Comment from @idryomov: There is a delta between the original commit and the backport due to ceph#45762 [1] not getting backported to quincy. [1] ceph#45762
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.
Check if the lock was expired, if it is, unlock will return -ENOENT and not 0
that will cause the assert to error.
Fixes: https://tracker.ceph.com/issues/38357
Signed-off-by: Nitzan Mordechai nmordec@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows