From d600dc93215c03483e21c3eea2e67caefc576954 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 8 Jul 2013 21:41:55 -0700 Subject: [PATCH] mon/PaxosService: unwind service_should_trim() helper Nobody overloads it; put it inline in should_trim(). Signed-off-by: Sage Weil --- src/mon/PaxosService.cc | 3 ++- src/mon/PaxosService.h | 13 ------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index 7be5f9f6b1c..5c06f193271 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 3d9d8acd00f..cd00718a367 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 -- 2.47.3