1
0
mirror of https://github.com/ceph/ceph synced 2025-04-01 14:51:13 +00:00

osdmap: add const markers to some unfixed functions

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This commit is contained in:
Greg Farnum 2011-12-23 14:27:15 -08:00 committed by Sage Weil
parent e18b1c9734
commit 5d5c9b6fc3

View File

@ -490,7 +490,7 @@ private:
}
public:
int pg_to_osds(pg_t pg, vector<int>& raw) {
int pg_to_osds(pg_t pg, vector<int>& raw) const {
const pg_pool_t *pool = get_pg_pool(pg.pool());
if (!pool)
return 0;
@ -616,7 +616,7 @@ public:
return PG_ROLE_MIDDLE;
}
int get_pg_role(pg_t pg, int osd) {
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);