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

librbd: relax requirements on finisher canceled callback #37880

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

trociny
Copy link
Contributor

@trociny trociny commented Oct 28, 2020

The finisher timer is started with safe_callbacks = false, and
cancel_event may fail.

When canceling a task it is safe to just ignore the cancel_event
result and proceed, because the returned false value means the
callback is in TaskFinisher::complete already but before
acquiring the lock, so when it eventually acquires the lock it
will just find out the task is already deleted and return.

Signed-off-by: Mykola Golub mgolub@suse.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

The finisher timer is started with safe_callbacks = false, and
cancel_event may fail.

When canceling a task it is safe to just ignore the cancel_event
result and proceed, because the returned false value means the
callback is in TaskFinisher::complete already but before
acquiring the lock, so when it eventually acquires the lock it
will just find out the task is already deleted and return.

Signed-off-by: Mykola Golub <mgolub@suse.com>
…ting

This is cleanup just to make it consistent with other cases.

Signed-off-by: Mykola Golub <mgolub@suse.com>
Copy link

@dillaman dillaman left a 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
Projects
None yet
2 participants