mirror of
https://github.com/ceph/ceph
synced 2025-01-31 07:22:56 +00:00
osd: include pg pool in pg to placement seed mapping
This prevents different pools from overlaying on top of each other.
This commit is contained in:
parent
cb719ac3eb
commit
bc7d48fff5
@ -528,13 +528,15 @@ struct pg_pool_t {
|
||||
}
|
||||
|
||||
/*
|
||||
* map raw pg (full precision ps) into a placement ps
|
||||
* map raw pg (full precision ps) into a placement seed. include
|
||||
* pool id in that value so that different pools don't use the same
|
||||
* seeds.
|
||||
*/
|
||||
ps_t raw_pg_to_pps(pg_t pg) const {
|
||||
if (pg.preferred() >= 0 && v.lpgp_num)
|
||||
return ceph_stable_mod(pg.ps(), v.lpgp_num, lpgp_num_mask);
|
||||
return ceph_stable_mod(pg.ps() + pg.pool(), v.lpgp_num, lpgp_num_mask);
|
||||
else
|
||||
return ceph_stable_mod(pg.ps(), v.pgp_num, pgp_num_mask);
|
||||
return ceph_stable_mod(pg.ps() + pg.pool(), v.pgp_num, pgp_num_mask);
|
||||
}
|
||||
|
||||
void encode(bufferlist& bl) const {
|
||||
|
Loading…
Reference in New Issue
Block a user