]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tools/ceph-dencoder: register dencoders in plugin
authorKefu Chai <kchai@redhat.com>
Tue, 3 Aug 2021 12:44:01 +0000 (20:44 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 1 Sep 2022 17:08:25 +0000 (01:08 +0800)
commit87feb5734b24ab0177481a7ef9ab7c8666c4ebd7
tree9e6b367962a1e9801e51a35a7ed9929a2a247332
parent33c110fadc64f16589c066595df78b08da5381ff
tools/ceph-dencoder: register dencoders in plugin

so we can allocate and deallocate dencoders in the shared library,
instead of allocating them in the shared library, while deallocating
them in the executable.

after this change

- the plugin holds the strong references of the dencoders
- the registry holds the plugins and weak references of dencoders
- the dencoder shared libraries calls the method exposed by plugin
  to alloc/dealloc the dencoders

this change should address the segfault when compiling with Clang.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ae7e79db7b5bc38d8ecde6705932ff2671c9c326)
src/tools/ceph-dencoder/ceph_dencoder.cc
src/tools/ceph-dencoder/common_types.cc
src/tools/ceph-dencoder/denc_plugin.h
src/tools/ceph-dencoder/denc_registry.h
src/tools/ceph-dencoder/mds_types.cc
src/tools/ceph-dencoder/osd_types.cc
src/tools/ceph-dencoder/rbd_types.cc
src/tools/ceph-dencoder/rgw_types.cc