]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: use get_addrs()
authorSage Weil <sage@redhat.com>
Wed, 30 May 2018 20:12:28 +0000 (15:12 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jun 2018 13:08:20 +0000 (08:08 -0500)
These are legacy interfaces that should return an IP only.

Signed-off-by: Sage Weil <sage@redhat.com>
src/client/Client.cc

index 0e92b886c2155c6333016b15c1e3068e4b627dff..57fce6c2d84df91b40bbb3fcf6533c22b535e047 100644 (file)
@@ -12431,7 +12431,7 @@ int Client::ll_osdaddr(int osd, uint32_t *addr)
   bool exists = objecter->with_osdmap([&](const OSDMap& o) {
       if (!o.exists(osd))
        return false;
-      g = o.get_addr(osd);
+      g = o.get_addrs(osd).front();
       return true;
     });
   if (!exists)
@@ -13449,7 +13449,7 @@ int Client::get_file_stripe_address(int fd, loff_t offset,
       if (osds.empty())
        return -EINVAL;
       for (unsigned i = 0; i < osds.size(); i++) {
-       entity_addr_t addr = o.get_addr(osds[i]);
+       entity_addr_t addr = o.get_addrs(osds[i]).front();
        address.push_back(addr);
       }
       return 0;
@@ -13467,7 +13467,7 @@ int Client::get_osd_addr(int osd, entity_addr_t& addr)
       if (!o.exists(osd))
        return -ENOENT;
 
-      addr = o.get_addr(osd);
+      addr = o.get_addrs(osd).front();
       return 0;
     });
 }