From: Sage Weil Date: Tue, 8 Apr 2014 16:01:14 +0000 (-0700) Subject: osd: drop unused same_for_*() helpers X-Git-Tag: v0.80-rc1~71^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d2edd9c1d3bec45c33daa8a42ba5b3b4eeedfbb4;p=ceph.git osd: drop unused same_for_*() helpers These were all identical and mostly served to obscure the actual logic, which is now captured by can_discard_op() and the matching Objecter code on the client side. Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.h b/src/osd/PG.h index f6873add98b3..a6536e8f8d57 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -2107,10 +2107,6 @@ public: virtual int do_command(cmdmap_t cmdmap, ostream& ss, bufferlist& idata, bufferlist& odata) = 0; - virtual bool same_for_read_since(epoch_t e) = 0; - virtual bool same_for_modify_since(epoch_t e) = 0; - virtual bool same_for_rep_modify_since(epoch_t e) = 0; - virtual void on_role_change() = 0; virtual void on_pool_change() = 0; virtual void on_change(ObjectStore::Transaction *t) = 0; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 1b798c1116a1..ae755fcb531c 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -368,24 +368,6 @@ PerfCounters *ReplicatedPG::get_logger() return osd->logger; } -// ======================= -// pg changes - -bool ReplicatedPG::same_for_read_since(epoch_t e) -{ - return (e >= info.history.same_primary_since); -} - -bool ReplicatedPG::same_for_modify_since(epoch_t e) -{ - return (e >= info.history.same_primary_since); -} - -bool ReplicatedPG::same_for_rep_modify_since(epoch_t e) -{ - // check osd map: same set, or primary+acker? - return e >= info.history.same_primary_since; -} // ==================== // missing objects diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 4d6000da8c4a..d1bf3597684d 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -1322,10 +1322,6 @@ private: int _delete_oid(OpContext *ctx, bool no_whiteout); int _rollback_to(OpContext *ctx, ceph_osd_op& op); public: - bool same_for_read_since(epoch_t e); - bool same_for_modify_since(epoch_t e); - bool same_for_rep_modify_since(epoch_t e); - bool is_missing_object(const hobject_t& oid) const; bool is_unreadable_object(const hobject_t &oid) const { return is_missing_object(oid) ||