]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix wrong return type of find_osd_on_ip()
authorxiexingguo <xie.xingguo@zte.com.cn>
Fri, 26 Feb 2016 10:28:41 +0000 (18:28 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sat, 27 Feb 2016 13:27:42 +0000 (21:27 +0800)
Fixes: #14872
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSDMap.cc
src/osd/OSDMap.h

index 9de54a9ecf7f707577c77552389a377151126c11..d82878864e2c913dcc3ba677071847cc9b668473 100644 (file)
@@ -1010,7 +1010,7 @@ int OSDMap::identify_osd(const uuid_d& u) const
   return -1;
 }
 
-bool OSDMap::find_osd_on_ip(const entity_addr_t& ip) const
+int OSDMap::find_osd_on_ip(const entity_addr_t& ip) const
 {
   for (int i=0; i<max_osd; i++)
     if (exists(i) && (get_addr(i).is_same_host(ip) || get_cluster_addr(i).is_same_host(ip)))
index 6694e27b3bb99ac7484423be9dea5a19dd3a52cd..8ed5896422ec123224371a6483acd5650f4086cd 100644 (file)
@@ -466,7 +466,7 @@ public:
   bool have_addr(const entity_addr_t& addr) const {
     return identify_osd(addr) >= 0;
   }
-  bool find_osd_on_ip(const entity_addr_t& ip) const;
+  int find_osd_on_ip(const entity_addr_t& ip) const;
   bool have_inst(int osd) const {
     return exists(osd) && is_up(osd); 
   }