X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Flibrbd%2FImageCtx.cc;h=23beddedb88ff4b272166ddc1abc087e5643604f;hb=f6b5b4d738b87d88d2de35127b6b0e41eae2a272;hp=74bd121bad7df3b650ef189d57e7404e0cdc9d17;hpb=12732ca2e80d168d344a265acffc1fbd1fa1f1b5;p=ceph.git diff --git a/ceph/src/librbd/ImageCtx.cc b/ceph/src/librbd/ImageCtx.cc index 74bd121ba..23beddedb 100644 --- a/ceph/src/librbd/ImageCtx.cc +++ b/ceph/src/librbd/ImageCtx.cc @@ -122,7 +122,6 @@ public: operations(new Operations<>(*this)), exclusive_lock(nullptr), object_map(nullptr), io_work_queue(nullptr), op_work_queue(nullptr), - external_callback_completions(32), event_socket_completions(32), asok_hook(nullptr), trace_endpoint("librbd") @@ -158,6 +157,7 @@ public: } ImageCtx::~ImageCtx() { + ceph_assert(config_watcher == nullptr); ceph_assert(image_watcher == NULL); ceph_assert(exclusive_lock == NULL); ceph_assert(object_map == NULL); @@ -727,6 +727,8 @@ public: bool thread_safe) { ldout(cct, 20) << __func__ << dendl; + std::unique_lock image_locker(image_lock); + // reset settings back to global defaults for (auto& key : config_overrides) { std::string value; @@ -765,6 +767,8 @@ public: } } + image_locker.unlock(); + #define ASSIGN_OPTION(param, type) \ param = config.get_val("rbd_"#param)