]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tools/ceph-dencoder: register dencoders in plugin 42607/head
authorKefu Chai <kchai@redhat.com>
Tue, 3 Aug 2021 12:44:01 +0000 (20:44 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 3 Aug 2021 12:51:43 +0000 (20:51 +0800)
commitae7e79db7b5bc38d8ecde6705932ff2671c9c326
tree0fbf1035f3838a85ce86771a930d65dbaa9b24d2
parent957b1c247c25713297c5d72964f553a8014f81ef
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>
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