From: Sage Weil Date: Tue, 9 Jul 2013 04:41:55 +0000 (-0700) Subject: mon/PaxosService: unwind service_should_trim() helper X-Git-Tag: v0.67-rc1~134^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d600dc93215c03483e21c3eea2e67caefc576954;p=ceph.git mon/PaxosService: unwind service_should_trim() helper Nobody overloads it; put it inline in should_trim(). Signed-off-by: Sage Weil --- diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index 7be5f9f6b1c3..5c06f193271b 100644 --- a/src/mon/PaxosService.cc +++ b/src/mon/PaxosService.cc @@ -337,7 +337,8 @@ void PaxosService::maybe_trim() bool PaxosService::should_trim() { - if (!service_should_trim()) + update_trim(); + if (get_trim_to() == 0) return false; if (g_conf->paxos_service_trim_min > 0) { diff --git a/src/mon/PaxosService.h b/src/mon/PaxosService.h index 3d9d8acd00fe..cd00718a3671 100644 --- a/src/mon/PaxosService.h +++ b/src/mon/PaxosService.h @@ -691,19 +691,6 @@ public: */ bool should_trim(); - /** - * Check if we should trim. - * - * We define this function here, because we assume that as long as we know of - * a version to trim, we should trim. However, any implementation should feel - * free to define its own version of this function if deemed necessary. - * - * @returns true if we should trim; false otherwise. - */ - virtual bool service_should_trim() { - update_trim(); - return (get_trim_to() > 0); - } /** * Update our trim status. We do nothing here, because there is no * straightforward way to update the trim version, since that's service