]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add missing virtual decls for dtors 45734/head
authorKaleb S. KEITHLEY <kkeithle@redhat.com>
Wed, 30 Mar 2022 12:26:23 +0000 (08:26 -0400)
committerKaleb S. KEITHLEY <kkeithle@redhat.com>
Wed, 30 Mar 2022 12:26:23 +0000 (08:26 -0400)
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 <kkeithle@redhat.com>
src/cls/rgw/cls_rgw_client.h
src/rgw/rgw_acl_s3.h
src/rgw/rgw_aio_throttle.h
src/rgw/rgw_compression.h
src/rgw/rgw_coroutine.h
src/rgw/rgw_lc.h
src/rgw/rgw_putobj.h
src/rgw/rgw_xml.h

index 356b873a4f126c8777acee64ce8da2cb0f88027d..585cb3d40dfd6d7e556d9749d8ad6c268894be7a 100644 (file)
@@ -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<int, std::string>& _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<int, std::string>& _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<int, cls_rgw_bi_log_list_ret>& 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<int, std::string>& _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<int, rgw_cls_check_index_ret>& 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<int, std::string>& 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<int, std::string>& oids, std::map<int, rgw_cls_list_ret>& 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<int, std::string>& _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<int, std::string>& _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<int, std::string>& _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);
index 657fb1f6716594eded0d4dc7d3100b42ca5a3ac4..907bcc17676e773e3dcc33cf0c033603a6b4623a 100644 (file)
@@ -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;
 
index 26a3578cabff552e8d0823a450b1c17cfb1d53ea..30ae93cd6b546fd73ea2c03a3f9535727700d699 100644 (file)
@@ -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;
 
index 8e8717b0df2c011e1bf1854b96b3b5aad985446e..40398c886e1a567971035c048eece05ce50a8675 100644 (file)
@@ -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;
 
index 1a9fa62cd32147469fba74bcbe224687e5770162..25a2b60bc0a4e98956d54f6bd1c05ba01016fc27 100644 (file)
@@ -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;
index 79cb7bb855ca35377ea36286691f886a3a93371f..d50af2c3cf5aa0cbd2a2424d2691fc1c0ffceb84 100644 (file)
@@ -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<std::string>& get_cloud_targets() { return cloud_targets; }
-    ~LCWorker();
+    virtual ~LCWorker() override;
 
     friend class RGWRados;
     friend class RGWLC;
@@ -510,7 +510,7 @@ public:
   std::vector<std::unique_ptr<RGWLC::LCWorker>> workers;
 
   RGWLC() : cct(nullptr), store(nullptr) {}
-  ~RGWLC();
+  virtual ~RGWLC() override;
 
   void initialize(CephContext *_cct, rgw::sal::Store* _store);
   void finalize();
index 1c16b22540a36c57c8e0c47116bea866f4873827..6740e88ce42ec86aea4d4d7e10d3fd46d594f8bf 100644 (file)
@@ -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;
 };
index c56c8c5247d74d38ae13225ac20cd1daba6436bd..6a34344fbeb990a3ed1e6de6a1d627e9e72b2254 100644 (file)
@@ -20,7 +20,7 @@ public:
   typedef std::map<std::string, XMLObj *>::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();