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

mimic: [test] periodic seg faults within unittest_librbd #24711

Merged
merged 1 commit into from
Oct 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/librbd/deep_copy/ObjectCopyRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,16 @@ void ObjectCopyRequest<I>::send_update_object_map() {
finish_op_ctx->complete(0);
});

m_dst_image_ctx->object_map_lock.get_write();
bool sent = m_dst_image_ctx->object_map->template aio_update<
auto dst_image_ctx = m_dst_image_ctx;
dst_image_ctx->object_map_lock.get_write();
bool sent = dst_image_ctx->object_map->template aio_update<
Context, &Context::complete>(dst_snap_id, m_dst_object_number, object_state,
{}, {}, false, ctx);
m_dst_image_ctx->object_map_lock.put_write();
m_dst_image_ctx->snap_lock.put_read();
m_dst_image_ctx->owner_lock.put_read();

// NOTE: state machine might complete before we reach here
dst_image_ctx->object_map_lock.put_write();
dst_image_ctx->snap_lock.put_read();
dst_image_ctx->owner_lock.put_read();
if (!sent) {
assert(dst_snap_id == CEPH_NOSNAP);
ctx->complete(0);
Expand Down