]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PGBackend: PGBackend interface cleanup - make some interface methods pure virtual...
authorIgor Fedotov <ifedotov@mirantis.com>
Fri, 29 Jan 2016 17:19:24 +0000 (20:19 +0300)
committerIgor Fedotov <ifedotov@mirantis.com>
Mon, 1 Feb 2016 15:33:43 +0000 (18:33 +0300)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/osd/PGBackend.h
src/osd/ReplicatedBackend.h

index 1e410c76d9d3c5cb7e157bdc74f7e59f852dde51..948ec8647b4603e010cb9e45a04b76221b7a5ce8 100644 (file)
                pair<bufferlist*, Context*> > > &to_read,
      Context *on_complete, bool fast_read = false) = 0;
 
-   virtual bool scrub_supported() { return false; }
-   virtual bool auto_repair_supported() const { return false; }
+   virtual bool scrub_supported() = 0;
+   virtual bool auto_repair_supported() const = 0;
    void be_scan_list(
      ScrubMap &map, const vector<hobject_t> &ls, bool deep, uint32_t seed,
      ThreadPool::TPHandle &handle);
      const vector<int> &acting,
      ostream &errorstream);
    virtual uint64_t be_get_ondisk_size(
-     uint64_t logical_size) { assert(0); return 0; }
+     uint64_t logical_size) = 0;
    virtual void be_deep_scrub(
      const hobject_t &poid,
      uint32_t seed,
      ScrubMap::object &o,
-     ThreadPool::TPHandle &handle) { assert(0); }
+     ThreadPool::TPHandle &handle) = 0;
 
    static PGBackend *build_pg_backend(
      const pg_pool_t &pool,
index 7a1b72aeb963e9545d70fb4e3c11d3edbbd2a410..b56ac21b8989707ff0b5e627e103eeeb523e5828 100644 (file)
@@ -434,6 +434,8 @@ private:
   void sub_op_modify_applied(RepModifyRef rm);
   void sub_op_modify_commit(RepModifyRef rm);
   bool scrub_supported() { return true; }
+  bool auto_repair_supported() const { return false; }
+
 
   void be_deep_scrub(
     const hobject_t &obj,