From: Igor Fedotov Date: Fri, 29 Jan 2016 17:19:24 +0000 (+0300) Subject: osd/PGBackend: PGBackend interface cleanup - make some interface methods pure virtual... X-Git-Tag: v10.0.4~83^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ccebf7a37a5b6af7b65cef7cfda074bbbf658fb2;p=ceph.git osd/PGBackend: PGBackend interface cleanup - make some interface methods pure virtual instead of assertion usage. Signed-off-by: Igor Fedotov --- diff --git a/src/osd/PGBackend.h b/src/osd/PGBackend.h index 1e410c76d9d3..948ec8647b46 100644 --- a/src/osd/PGBackend.h +++ b/src/osd/PGBackend.h @@ -555,8 +555,8 @@ pair > > &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 &ls, bool deep, uint32_t seed, ThreadPool::TPHandle &handle); @@ -585,12 +585,12 @@ const vector &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, diff --git a/src/osd/ReplicatedBackend.h b/src/osd/ReplicatedBackend.h index 7a1b72aeb963..b56ac21b8989 100644 --- a/src/osd/ReplicatedBackend.h +++ b/src/osd/ReplicatedBackend.h @@ -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,