提交 9542cf0b 编写于 作者: S Sage Weil

libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc

Fix a typo that used the wrong bitmask for the pg.seed calculation.  This
is normally unnoticed because in most cases pg_num == pgp_num.  It is, however,
a bug that is easily corrected.

CC: stable@vger.kernel.org
Signed-off-by: NSage Weil <sage@inktank.com>
Reviewed-by: NAlex Elder <alex.elder@linary.org>
上级 17c1cc1d
...@@ -1129,7 +1129,7 @@ static int *calc_pg_raw(struct ceph_osdmap *osdmap, struct ceph_pg pgid, ...@@ -1129,7 +1129,7 @@ static int *calc_pg_raw(struct ceph_osdmap *osdmap, struct ceph_pg pgid,
/* pg_temp? */ /* pg_temp? */
pgid.seed = ceph_stable_mod(pgid.seed, pool->pg_num, pgid.seed = ceph_stable_mod(pgid.seed, pool->pg_num,
pool->pgp_num_mask); pool->pg_num_mask);
pg = __lookup_pg_mapping(&osdmap->pg_temp, pgid); pg = __lookup_pg_mapping(&osdmap->pg_temp, pgid);
if (pg) { if (pg) {
*num = pg->len; *num = pg->len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册