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

rbd-mirror: removed dedicated thread from image deleter #19000

Merged
merged 7 commits into from Nov 21, 2017

Conversation

dillaman
Copy link

No description provided.


namespace {

const int EISPRM = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I see this was in the original code too. Anyway do we need a special error code here? We do not check for it, and it may propagate to ImageReplayer, and I suppose cpp_strerror() will generate a strange log message. May be use EBUSY instead?

"rbd_mirror_concurrent_image_deletions")),
m_failed_interval(g_ceph_context->_conf->get_val<double>(
"rbd_mirror_delete_retry_interval")),
m_lock("rbd::mirror::ImageDeleter::m_lock"),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: If we did not cache these config settings in member variables we could change them in runtime.

derr << "failed to close: " << cpp_strerror(r) << dendl;
finish(r);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@dillaman need to delete m_image_ctx

@dillaman
Copy link
Author

@trociny thanks -- update pushed

Jason Dillaman added 6 commits November 21, 2017 09:17
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Fixes: http://tracker.ceph.com/issues/15322
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@dillaman
Copy link
Author

Fixed a race condition in the TestImageDeleter unit tests where the error code would be dropped due to a possible race condition

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

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

lgtm

@trociny trociny merged commit 2db4e96 into ceph:master Nov 21, 2017
@dillaman dillaman deleted the wip-15322 branch November 21, 2017 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants