From: Sage Weil Date: Wed, 17 Oct 2012 04:13:54 +0000 (-0700) Subject: monclient: drop now-unused MonClient::is_latest_map() X-Git-Tag: v0.55~238^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bcd6aea3c92ef498e550c486a9ee12e2d1bbfd92;p=ceph.git monclient: drop now-unused MonClient::is_latest_map() Any sensible caller probably wants to use get_version() directly. Signed-off-by: Sage Weil --- diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 54f8dabf7589..b594c4f07966 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 2b117b9cdc49..eddd1bde2d14 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 *