]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monclient: drop now-unused MonClient::is_latest_map()
authorSage Weil <sage@inktank.com>
Wed, 17 Oct 2012 04:13:54 +0000 (21:13 -0700)
committerSage Weil <sage@inktank.com>
Wed, 17 Oct 2012 04:13:54 +0000 (21:13 -0700)
Any sensible caller probably wants to use get_version() directly.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/MonClient.cc
src/mon/MonClient.h

index 54f8dabf7589962d660aa0a48fa6dbc4d04b1d05..b594c4f079660d94237d62daf1ec422189ef5156 100644 (file)
@@ -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;
index 2b117b9cdc49cbcedd31d8967f2cf9258e60e4b4..eddd1bde2d14cd49390d541a0b0cb286a747fd59 100644 (file)
@@ -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
    *