]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdmap: drop useless and unused get_pg_role() method
authorSage Weil <sage@inktank.com>
Sat, 14 Jul 2012 21:32:28 +0000 (14:32 -0700)
committerSage Weil <sage@inktank.com>
Sun, 15 Jul 2012 00:39:34 +0000 (17:39 -0700)
Users probably want get_pg_acting_rank().  If they don't, they can probably
have the mapping and can calculate the rank themselves.  Having this here
is asking for bugs like #2022.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSDMap.h

index 564f6dffda303825b50dd1103b95aff25ab2844f..e34802a8209dc54f557b04a6faee72fc1dc4c4d3 100644 (file)
@@ -493,12 +493,6 @@ public:
   static int calc_pg_rank(int osd, vector<int>& acting, int nrep=0);
   static int calc_pg_role(int osd, vector<int>& acting, int nrep=0);
   
-  int get_pg_role(pg_t pg, int osd) const {
-    vector<int> group;
-    int nrep = pg_to_osds(pg, group);
-    return calc_pg_role(osd, group, nrep);
-  }
-  
   /* rank is -1 (stray), 0 (primary), 1,2,3,... (replica) */
   int get_pg_acting_rank(pg_t pg, int osd) const {
     vector<int> group;