working on zipper loadable modules reveals issues with dtors in several classes.
These manifest as undefined references to vtable and typeinfo when linking librgw.so.
(Note: you won't see these until more zipper work is merged.)
This is due to:
some classes don't declare a dtor at all
some classes don't declare the dtor as virtual
some classes define the dtor inline in the decl in the .h
some classes don't have a defn at all
etc.
https://tracker.ceph.com/issues/51599
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
return status;
}
+RGWCoroutinesManager::~RGWCoroutinesManager() {
+ stop();
+ completion_mgr->put();
+ if (cr_registry) {
+ cr_registry->remove(this);
+ }
+}
+
int64_t RGWCoroutinesManager::get_next_io_id()
{
return (int64_t)++max_io_id;
}
public:
RGWCoroutine(CephContext *_cct) : status(_cct), _yield_ret(false), cct(_cct), stack(NULL), retcode(0), state(RGWCoroutine_Run) {}
- ~RGWCoroutine() override;
+ virtual ~RGWCoroutine() override;
virtual int operate(const DoutPrefixProvider *dpp) = 0;
public:
explicit RGWCoroutinesManagerRegistry(CephContext *_cct) : cct(_cct) {}
- ~RGWCoroutinesManagerRegistry() override;
+ virtual ~RGWCoroutinesManagerRegistry() override;
void add(RGWCoroutinesManager *mgr);
void remove(RGWCoroutinesManager *mgr);
cr_registry->add(this);
}
}
- virtual ~RGWCoroutinesManager() {
- stop();
- completion_mgr->put();
- if (cr_registry) {
- cr_registry->remove(this);
- }
- }
+ virtual ~RGWCoroutinesManager();
int run(const DoutPrefixProvider *dpp, list<RGWCoroutinesStack *>& ops);
int run(const DoutPrefixProvider *dpp, RGWCoroutine *op);
interval(_interval), caller(_caller)
{}
+ virtual ~RGWContinuousLeaseCR() override;
+
int operate(const DoutPrefixProvider *dpp) override;
bool is_locked() const {
return true;
}
+RGWMultiXMLParser::~RGWMultiXMLParser() {}
XMLObj *RGWMultiXMLParser::alloc_obj(const char *el) {
XMLObj *obj = NULL;
XMLObj *alloc_obj(const char *el) override;
public:
RGWMultiXMLParser() {}
- ~RGWMultiXMLParser() override {}
+ virtual ~RGWMultiXMLParser() override;
};
extern bool is_v2_upload_id(const string& upload_id);
return 0;
}
+RGWOp::~RGWOp(){};
+
int RGWOp::verify_op_mask()
{
uint32_t required_mask = op_mask();
op_ret(0) {
}
- virtual ~RGWOp() = default;
+ virtual ~RGWOp() override;
int get_ret() const { return op_ret; }
namespace rgw::sal {
+RadosObject::~RadosObject() {}
+
static int decode_policy(CephContext* cct,
bufferlist& bl,
RGWAccessControlPolicy* policy)
return nullptr;
}
+RadosBucket::~RadosBucket() {}
+
int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp,
bool delete_children,
std::string prefix,
}
RadosObject(RadosObject& _o) = default;
+ virtual ~RadosObject();
+
virtual int delete_object(const DoutPrefixProvider* dpp, RGWObjectCtx* obj_ctx,
optional_yield y, bool prevent_versioning) override;
virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio,
acls() {
}
- ~RadosBucket() { }
+ virtual ~RadosBucket();
virtual std::unique_ptr<Object> get_object(const rgw_obj_key& k) override;
virtual int list(const DoutPrefixProvider* dpp, ListParams&, int, ListResults&, optional_yield y) override;
return 0;
}
+RGWServiceInstance::~RGWServiceInstance() {}
+
int RGWServiceInstance::start(optional_yield y, const DoutPrefixProvider *dpp)
{
if (start_state != StateInit) {
}
public:
RGWServiceInstance(CephContext *_cct) : cct(_cct) {}
- virtual ~RGWServiceInstance() {}
+ virtual ~RGWServiceInstance();
int start(optional_yield y, const DoutPrefixProvider *dpp);
bool is_started() {
static string mdlog_sync_status_shard_prefix = "mdlog.sync-status.shard";
static string mdlog_sync_full_sync_index_prefix = "meta.full-sync.index";
+RGWContinuousLeaseCR::~RGWContinuousLeaseCR() {}
+
RGWSyncErrorLogger::RGWSyncErrorLogger(rgw::sal::RadosStore* _store, const string &oid_prefix, int _num_shards) : store(_store), num_shards(_num_shards) {
for (int i = 0; i < num_shards; i++) {
oids.push_back(get_shard_oid(oid_prefix, i));
bool spawn_next() override;
};
-RGWRemoteMetaLog::~RGWRemoteMetaLog()
-{
- delete error_logger;
-}
-
int RGWRemoteMetaLog::read_log_info(const DoutPrefixProvider *dpp, rgw_mdlog_info *log_info)
{
rgw_http_param_pair pairs[] = { { "type", "metadata" },
http_manager(store->ctx(), completion_mgr),
status_manager(_sm) {}
- ~RGWRemoteMetaLog() override;
+ virtual ~RGWRemoteMetaLog() override;
int init();
void finish();
RGWMetaSyncStatusManager(rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados)
: store(_store), master_log(this, store, async_rados, this)
{}
+
+ virtual ~RGWMetaSyncStatusManager() override;
+
int init(const DoutPrefixProvider *dpp);
int read_sync_status(const DoutPrefixProvider *dpp, rgw_meta_sync_status *sync_status) {
using namespace rgw_zone_defaults;
+RGWMetaSyncStatusManager::~RGWMetaSyncStatusManager(){}
+
#define FIRST_EPOCH 1
void RGWDefaultZoneGroupInfo::dump(Formatter *f) const {
}
+RGWRealm::~RGWRealm() {}
+
+RGWRemoteMetaLog::~RGWRemoteMetaLog()
+{
+ delete error_logger;
+}
+
const string& RGWRealm::get_predefined_name(CephContext *cct) const {
return cct->_conf->rgw_realm;
}
RGWRealm(const std::string& _id, const std::string& _name = "") : RGWSystemMetaObj(_id, _name) {}
RGWRealm(CephContext *_cct, RGWSI_SysObj *_sysobj_svc): RGWSystemMetaObj(_cct, _sysobj_svc) {}
RGWRealm(const std::string& _name, CephContext *_cct, RGWSI_SysObj *_sysobj_svc): RGWSystemMetaObj(_name, _cct, _sysobj_svc){}
+ virtual ~RGWRealm() override;
void encode(bufferlist& bl) const override {
ENCODE_START(1, 1, bl);
#include "svc_rados.h"
#include "svc_config_key_rados.h"
+RGWSI_ConfigKey_RADOS::~RGWSI_ConfigKey_RADOS(){}
+
int RGWSI_ConfigKey_RADOS::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
maybe_insecure_mon_conn = !svc.rados->check_secure_mon_conn(dpp);
RGWSI_ConfigKey_RADOS(CephContext *cct) : RGWSI_ConfigKey(cct) {}
+ virtual ~RGWSI_ConfigKey_RADOS() override;
+
int get(const string& key, bool secure, bufferlist *result) override;
};
static string notify_oid_prefix = "notify";
+RGWSI_Notify::~RGWSI_Notify()
+{
+ shutdown();
+}
+
+
class RGWWatcher : public DoutPrefixProvider , public librados::WatchCtx2 {
CephContext *cct;
RGWSI_Notify *svc;
finalized = true;
}
-RGWSI_Notify::~RGWSI_Notify()
-{
- shutdown();
-}
-
int RGWSI_Notify::unwatch(RGWSI_RADOS::Obj& obj, uint64_t watch_handle)
{
int r = obj.unwatch(watch_handle);
void schedule_context(Context *c);
public:
RGWSI_Notify(CephContext *cct): RGWServiceInstance(cct) {}
- ~RGWSI_Notify();
+
+ virtual ~RGWSI_Notify() override;
class CB {
public:
const std::string MP_META_SUFFIX = ".meta";
+MultipartMetaFilter::~MultipartMetaFilter() {}
+
bool MultipartMetaFilter::filter(const string& name, string& key) {
// the length of the suffix so we can skip past it
static const size_t MP_META_SUFFIX_LEN = MP_META_SUFFIX.length();
public:
MultipartMetaFilter() {}
+ virtual ~MultipartMetaFilter() override;
+
/**
* @param name [in] The object name as it appears in the bucket index.
* @param key [out] An output parameter that will contain the bucket