From: Sage Weil Date: Thu, 29 Aug 2013 00:17:29 +0000 (-0700) Subject: libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc X-Git-Tag: v3.11.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc2a02319530276f4c26b7c219111aae37b8dc1b;p=thirdparty%2Fkernel%2Fstable.git libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc commit 9542cf0bf9b1a3adcc2ef271edbcbdba03abf345 upstream. 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. Signed-off-by: Sage Weil Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 603ddd92db196..dbd9a47924274 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -1129,7 +1129,7 @@ static int *calc_pg_raw(struct ceph_osdmap *osdmap, struct ceph_pg pgid, /* pg_temp? */ 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); if (pg) { *num = pg->len;