From bcd6aea3c92ef498e550c486a9ee12e2d1bbfd92 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Oct 2012 21:13:54 -0700 Subject: [PATCH] monclient: drop now-unused MonClient::is_latest_map() Any sensible caller probably wants to use get_version() directly. Signed-off-by: Sage Weil --- src/mon/MonClient.cc | 17 ----------------- src/mon/MonClient.h | 10 ---------- 2 files changed, 27 deletions(-) diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 54f8dabf75899..b594c4f079660 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -690,23 +690,6 @@ int MonClient::wait_auth_rotating(double timeout) // --------- -struct C_IsLatestMap : public Context { - Context *onfinish; - version_t newest; - version_t have; - C_IsLatestMap(Context *f, version_t h) : onfinish(f), newest(0), have(h) {} - void finish(int r) { - onfinish->complete(r == 0 ? (have != newest) : r); - } -}; - -void MonClient::is_latest_map(string map, version_t cur_ver, Context *onfinish) -{ - ldout(cct, 10) << "is_latest_map " << map << " current " << cur_ver << dendl;; - C_IsLatestMap *c = new C_IsLatestMap(onfinish, cur_ver); - get_version(map, &c->newest, NULL, c); -} - void MonClient::get_version(string map, version_t *newest, version_t *oldest, Context *onfinish) { ldout(cct, 10) << "get_version " << map << dendl; diff --git a/src/mon/MonClient.h b/src/mon/MonClient.h index 2b117b9cdc49c..eddd1bde2d14c 100644 --- a/src/mon/MonClient.h +++ b/src/mon/MonClient.h @@ -245,16 +245,6 @@ public: // version requests public: - /** - * check if we have the latest version of a map - * - * @param map name of map (e.g., 'osdmap') - * @param cur_ver version we have - * @param onfinish completion - * @return (via context) 1 if cur_ver is the latest, 0 if it is not, -EAGAIN if we need to retry - */ - void is_latest_map(string map, version_t cur_ver, Context *onfinish); - /** * get latest known version(s) of cluster map * -- 2.39.5