Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jewel'
Browse files Browse the repository at this point in the history
  • Loading branch information
jdurgin committed Dec 24, 2015
2 parents f8c4d04 + a297608 commit c485d29
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/librbd/ImageCtx.cc
Expand Up @@ -213,6 +213,8 @@ struct C_InvalidateCache : public Context {
}
delete[] format_string;

md_ctx.aio_flush();
data_ctx.aio_flush();
op_work_queue->drain();
aio_work_queue->drain();

Expand Down
1 change: 1 addition & 0 deletions src/librbd/image/RefreshRequest.cc
Expand Up @@ -275,6 +275,7 @@ Context *RefreshRequest<I>::handle_v2_get_flags(int *result) {
}
if (*result == -EOPNOTSUPP) {
// Older OSD doesn't support RBD flags, need to assume the worst
*result = 0;
ldout(cct, 10) << "OSD does not support RBD flags, disabling object map "
<< "optimizations" << dendl;
m_flags = RBD_FLAG_OBJECT_MAP_INVALID;
Expand Down
2 changes: 1 addition & 1 deletion src/librbd/internal.cc
Expand Up @@ -840,7 +840,7 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
snap_name),
boost::bind(&ImageWatcher::notify_snap_remove,
ictx->image_watcher, snap_name));
if (r < 0 && r != -EEXIST) {
if (r < 0 && r != -ENOENT) {
return r;
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/librbd/operation/SnapshotRemoveRequest.cc
Expand Up @@ -196,8 +196,8 @@ void SnapshotRemoveRequest<I>::send_release_snap_id() {
m_state = STATE_RELEASE_SNAP_ID;

// TODO add async version of selfmanaged_snap_remove
image_ctx.md_ctx.selfmanaged_snap_remove(m_snap_id);
this->async_complete(0);
int r = image_ctx.md_ctx.selfmanaged_snap_remove(m_snap_id);
this->async_complete(r);
}

template <typename I>
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/mock/MockImageCtx.h
Expand Up @@ -57,6 +57,8 @@ struct MockImageCtx {

~MockImageCtx() {
wait_for_async_requests();
image_ctx->md_ctx.aio_flush();
image_ctx->data_ctx.aio_flush();
image_ctx->op_work_queue->drain();
delete image_watcher;
delete op_work_queue;
Expand Down

0 comments on commit c485d29

Please sign in to comment.