From: Kaleb S. KEITHLEY Date: Wed, 30 Mar 2022 12:26:23 +0000 (-0400) Subject: rgw: add missing virtual decls for dtors X-Git-Tag: v18.0.0~1107^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=38eeb1bc3e0cd6d996ff457f90b748083bd50ac3;p=ceph.git rgw: add missing virtual decls for dtors As a side effect or benefit of zipper loadable module work have found several classes that are missing virtual decl on dtors, or are missing a dtor decl entirely. In the zipper loadable module work these missing decls result in undefined references the vtable for the various classes during the link. Signed-off-by: Kaleb S. KEITHLEY --- diff --git a/src/cls/rgw/cls_rgw_client.h b/src/cls/rgw/cls_rgw_client.h index 356b873a4f126..585cb3d40dfd6 100644 --- a/src/cls/rgw/cls_rgw_client.h +++ b/src/cls/rgw/cls_rgw_client.h @@ -294,8 +294,7 @@ public: io_ctx(ioc), objs_container(_objs_container), max_aio(_max_aio) {} - virtual ~CLSRGWConcurrentIO() - {} + virtual ~CLSRGWConcurrentIO() {} int operator()(); }; // class CLSRGWConcurrentIO @@ -311,6 +310,7 @@ public: std::map& _bucket_objs, uint32_t _max_aio) : CLSRGWConcurrentIO(ioc, _bucket_objs, _max_aio) {} + virtual ~CLSRGWIssueBucketIndexInit() override {} }; @@ -327,6 +327,7 @@ public: uint32_t _max_aio) : CLSRGWConcurrentIO(ioc, _bucket_objs, _max_aio) {} + virtual ~CLSRGWIssueBucketIndexClean() override {} }; @@ -338,6 +339,7 @@ public: CLSRGWIssueSetTagTimeout(librados::IoCtx& ioc, std::map& _bucket_objs, uint32_t _max_aio, uint64_t _tag_timeout) : CLSRGWConcurrentIO(ioc, _bucket_objs, _max_aio), tag_timeout(_tag_timeout) {} + virtual ~CLSRGWIssueSetTagTimeout() override {} }; void cls_rgw_bucket_update_stats(librados::ObjectWriteOperation& o, @@ -470,6 +472,7 @@ public: std::map& bi_log_lists, uint32_t max_aio) : CLSRGWConcurrentIO(io_ctx, oids, max_aio), result(bi_log_lists), marker_mgr(_marker_mgr), max(_max) {} + virtual ~CLSRGWIssueBILogList() override {} }; void cls_rgw_bilog_trim(librados::ObjectWriteOperation& op, @@ -495,6 +498,7 @@ public: BucketIndexShardsManager& _end_marker_mgr, std::map& _bucket_objs, uint32_t max_aio) : CLSRGWConcurrentIO(io_ctx, _bucket_objs, max_aio), start_marker_mgr(_start_marker_mgr), end_marker_mgr(_end_marker_mgr) {} + virtual ~CLSRGWIssueBILogTrim() override {} }; /** @@ -515,6 +519,7 @@ public: std::map& bucket_objs_ret, uint32_t _max_aio) : CLSRGWConcurrentIO(ioc, oids, _max_aio), result(bucket_objs_ret) {} + virtual ~CLSRGWIssueBucketCheck() override {} }; class CLSRGWIssueBucketRebuild : public CLSRGWConcurrentIO { @@ -523,6 +528,7 @@ protected: public: CLSRGWIssueBucketRebuild(librados::IoCtx& io_ctx, std::map& bucket_objs, uint32_t max_aio) : CLSRGWConcurrentIO(io_ctx, bucket_objs, max_aio) {} + virtual ~CLSRGWIssueBucketRebuild() override {} }; class CLSRGWIssueGetDirHeader : public CLSRGWConcurrentIO { @@ -533,6 +539,7 @@ public: CLSRGWIssueGetDirHeader(librados::IoCtx& io_ctx, std::map& oids, std::map& dir_headers, uint32_t max_aio) : CLSRGWConcurrentIO(io_ctx, oids, max_aio), result(dir_headers) {} + virtual ~CLSRGWIssueGetDirHeader() override {} }; class CLSRGWIssueSetBucketResharding : public CLSRGWConcurrentIO { @@ -543,6 +550,7 @@ public: CLSRGWIssueSetBucketResharding(librados::IoCtx& ioc, std::map& _bucket_objs, const cls_rgw_bucket_instance_entry& _entry, uint32_t _max_aio) : CLSRGWConcurrentIO(ioc, _bucket_objs, _max_aio), entry(_entry) {} + virtual ~CLSRGWIssueSetBucketResharding() override {} }; class CLSRGWIssueResyncBucketBILog : public CLSRGWConcurrentIO { @@ -551,6 +559,7 @@ protected: public: CLSRGWIssueResyncBucketBILog(librados::IoCtx& io_ctx, std::map& _bucket_objs, uint32_t max_aio) : CLSRGWConcurrentIO(io_ctx, _bucket_objs, max_aio) {} + virtual ~CLSRGWIssueResyncBucketBILog() override {} }; class CLSRGWIssueBucketBILogStop : public CLSRGWConcurrentIO { @@ -559,6 +568,7 @@ protected: public: CLSRGWIssueBucketBILogStop(librados::IoCtx& io_ctx, std::map& _bucket_objs, uint32_t max_aio) : CLSRGWConcurrentIO(io_ctx, _bucket_objs, max_aio) {} + virtual ~CLSRGWIssueBucketBILogStop() override {} }; int cls_rgw_get_dir_header_async(librados::IoCtx& io_ctx, std::string& oid, RGWGetDirHeader_CB *ctx); diff --git a/src/rgw/rgw_acl_s3.h b/src/rgw/rgw_acl_s3.h index 657fb1f671659..907bcc17676e7 100644 --- a/src/rgw/rgw_acl_s3.h +++ b/src/rgw/rgw_acl_s3.h @@ -20,7 +20,7 @@ class ACLPermission_S3 : public ACLPermission, public XMLObj { public: ACLPermission_S3() {} - ~ACLPermission_S3() override {} + virtual ~ACLPermission_S3() override {} bool xml_end(const char *el) override; void to_xml(std::ostream& out); @@ -30,7 +30,7 @@ class ACLGrantee_S3 : public ACLGrantee, public XMLObj { public: ACLGrantee_S3() {} - ~ACLGrantee_S3() override {} + virtual ~ACLGrantee_S3() override {} bool xml_start(const char *el, const char **attr); }; @@ -40,7 +40,7 @@ class ACLGrant_S3 : public ACLGrant, public XMLObj { public: ACLGrant_S3() {} - ~ACLGrant_S3() override {} + virtual ~ACLGrant_S3() override {} void to_xml(CephContext *cct, std::ostream& out); bool xml_end(const char *el) override; @@ -54,7 +54,7 @@ class RGWAccessControlList_S3 : public RGWAccessControlList, public XMLObj { public: explicit RGWAccessControlList_S3(CephContext *_cct) : RGWAccessControlList(_cct) {} - ~RGWAccessControlList_S3() override {} + virtual ~RGWAccessControlList_S3() override {} bool xml_end(const char *el) override; void to_xml(std::ostream& out); @@ -67,7 +67,7 @@ class ACLOwner_S3 : public ACLOwner, public XMLObj { public: ACLOwner_S3() {} - ~ACLOwner_S3() override {} + virtual ~ACLOwner_S3() override {} bool xml_end(const char *el) override; void to_xml(std::ostream& out); @@ -79,7 +79,7 @@ class RGWAccessControlPolicy_S3 : public RGWAccessControlPolicy, public XMLObj { public: explicit RGWAccessControlPolicy_S3(CephContext *_cct) : RGWAccessControlPolicy(_cct) {} - ~RGWAccessControlPolicy_S3() override {} + virtual ~RGWAccessControlPolicy_S3() override {} bool xml_end(const char *el) override; diff --git a/src/rgw/rgw_aio_throttle.h b/src/rgw/rgw_aio_throttle.h index 26a3578cabff5..30ae93cd6b546 100644 --- a/src/rgw/rgw_aio_throttle.h +++ b/src/rgw/rgw_aio_throttle.h @@ -45,7 +45,7 @@ class Throttle { public: Throttle(uint64_t window) : window(window) {} - ~Throttle() { + virtual ~Throttle() { // must drain before destructing ceph_assert(pending.empty()); ceph_assert(completed.empty()); @@ -66,6 +66,8 @@ class BlockingAioThrottle final : public Aio, private Throttle { public: BlockingAioThrottle(uint64_t window) : Throttle(window) {} + virtual ~BlockingAioThrottle() override {}; + AioResultList get(const RGWSI_RADOS::Obj& obj, OpFunc&& f, uint64_t cost, uint64_t id) override final; @@ -100,6 +102,8 @@ class YieldingAioThrottle final : public Aio, private Throttle { : Throttle(window), context(context), yield(yield) {} + virtual ~YieldingAioThrottle() override {}; + AioResultList get(const RGWSI_RADOS::Obj& obj, OpFunc&& f, uint64_t cost, uint64_t id) override final; diff --git a/src/rgw/rgw_compression.h b/src/rgw/rgw_compression.h index 8e8717b0df2c0..40398c886e1a5 100644 --- a/src/rgw/rgw_compression.h +++ b/src/rgw/rgw_compression.h @@ -33,7 +33,7 @@ public: RGWCompressionInfo* cs_info_, bool partial_content_, RGWGetObj_Filter* next); - ~RGWGetObj_Decompress() override {} + virtual ~RGWGetObj_Decompress() override {} int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) override; int fixup_range(off_t& ofs, off_t& end) override; @@ -51,6 +51,7 @@ public: RGWPutObj_Compress(CephContext* cct_, CompressorRef compressor, rgw::sal::DataProcessor *next) : Pipe(next), cct(cct_), compressor(compressor) {} + virtual ~RGWPutObj_Compress() override {}; int process(bufferlist&& data, uint64_t logical_offset) override; diff --git a/src/rgw/rgw_coroutine.h b/src/rgw/rgw_coroutine.h index 1a9fa62cd3214..25a2b60bc0a4e 100644 --- a/src/rgw/rgw_coroutine.h +++ b/src/rgw/rgw_coroutine.h @@ -65,7 +65,7 @@ protected: void _complete(RGWAioCompletionNotifier *cn, const rgw_io_id& io_id, void *user_info); public: explicit RGWCompletionManager(CephContext *_cct); - ~RGWCompletionManager() override; + virtual ~RGWCompletionManager() override; void complete(RGWAioCompletionNotifier *cn, const rgw_io_id& io_id, void *user_info); int get_next(io_completion *io); @@ -94,7 +94,7 @@ class RGWAioCompletionNotifier : public RefCountedObject { public: RGWAioCompletionNotifier(RGWCompletionManager *_mgr, const rgw_io_id& _io_id, void *_user_data); - ~RGWAioCompletionNotifier() override { + virtual ~RGWAioCompletionNotifier() override { c->release(); lock.lock(); bool need_unregister = registered; @@ -466,7 +466,7 @@ protected: bool collect_next(RGWCoroutine *op, int *ret, RGWCoroutinesStack **collected_stack); /* returns true if found a stack to collect */ public: RGWCoroutinesStack(CephContext *_cct, RGWCoroutinesManager *_ops_mgr, RGWCoroutine *start = NULL); - ~RGWCoroutinesStack() override; + virtual ~RGWCoroutinesStack() override; int64_t get_id() const { return id; @@ -718,7 +718,7 @@ class RGWSimpleCoroutine : public RGWCoroutine { public: RGWSimpleCoroutine(CephContext *_cct) : RGWCoroutine(_cct), called_cleanup(false) {} - ~RGWSimpleCoroutine() override; + virtual ~RGWSimpleCoroutine() override; virtual int init() { return 0; } virtual int send_request(const DoutPrefixProvider *dpp) = 0; diff --git a/src/rgw/rgw_lc.h b/src/rgw/rgw_lc.h index 79cb7bb855ca3..d50af2c3cf5aa 100644 --- a/src/rgw/rgw_lc.h +++ b/src/rgw/rgw_lc.h @@ -229,7 +229,7 @@ protected: public: LCRule(){}; - ~LCRule(){}; + virtual ~LCRule() {} const std::string& get_id() const { return id; @@ -498,7 +498,7 @@ public: bool should_work(utime_t& now); int schedule_next_start_time(utime_t& start, utime_t& now); std::set& get_cloud_targets() { return cloud_targets; } - ~LCWorker(); + virtual ~LCWorker() override; friend class RGWRados; friend class RGWLC; @@ -510,7 +510,7 @@ public: std::vector> workers; RGWLC() : cct(nullptr), store(nullptr) {} - ~RGWLC(); + virtual ~RGWLC() override; void initialize(CephContext *_cct, rgw::sal::Store* _store); void finalize(); diff --git a/src/rgw/rgw_putobj.h b/src/rgw/rgw_putobj.h index 1c16b22540a36..6740e88ce42ec 100644 --- a/src/rgw/rgw_putobj.h +++ b/src/rgw/rgw_putobj.h @@ -26,6 +26,8 @@ class Pipe : public rgw::sal::DataProcessor { public: explicit Pipe(rgw::sal::DataProcessor *next) : next(next) {} + virtual ~Pipe() override {} + // passes the data on to the next processor int process(bufferlist&& data, uint64_t offset) override { return next->process(std::move(data), offset); @@ -40,6 +42,7 @@ class ChunkProcessor : public Pipe { ChunkProcessor(rgw::sal::DataProcessor *next, uint64_t chunk_size) : Pipe(next), chunk_size(chunk_size) {} + virtual ~ChunkProcessor() override {} int process(bufferlist&& data, uint64_t offset) override; }; @@ -62,6 +65,7 @@ class StripeProcessor : public Pipe { uint64_t first_stripe_size) : Pipe(next), gen(gen), bounds(0, first_stripe_size) {} + virtual ~StripeProcessor() override {} int process(bufferlist&& data, uint64_t data_offset) override; }; diff --git a/src/rgw/rgw_xml.h b/src/rgw/rgw_xml.h index c56c8c5247d74..6a34344fbeb99 100644 --- a/src/rgw/rgw_xml.h +++ b/src/rgw/rgw_xml.h @@ -20,7 +20,7 @@ public: typedef std::map::iterator const_map_iter_t; XMLObjIter(); - ~XMLObjIter(); + virtual ~XMLObjIter(); void set(const XMLObjIter::const_map_iter_t &_cur, const XMLObjIter::const_map_iter_t &_end); XMLObj *get_next(); bool get_name(std::string& name) const; @@ -133,7 +133,7 @@ protected: public: RGWXMLParser(); - ~RGWXMLParser() override; + virtual ~RGWXMLParser() override; // initialize the parser, must be called before parsing bool init();