aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-28 20:17:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 20:18:29 -0400
commitfd5e2dea537bbf0bfb09f79a8b34c148bb502735 (patch)
tree4523f74a0b3ca7946260e1d59d661414e9ba1a99
parent2ab0ad6af3a87818ea3525914be6779fca833801 (diff)
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 <sage@inktank.com> Reviewed-by: Alex Elder <alex.elder@linary.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/ceph/osdmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 603ddd92db19..dbd9a4792427 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,
1129 1129
1130 /* pg_temp? */ 1130 /* pg_temp? */
1131 pgid.seed = ceph_stable_mod(pgid.seed, pool->pg_num, 1131 pgid.seed = ceph_stable_mod(pgid.seed, pool->pg_num,
1132 pool->pgp_num_mask); 1132 pool->pg_num_mask);
1133 pg = __lookup_pg_mapping(&osdmap->pg_temp, pgid); 1133 pg = __lookup_pg_mapping(&osdmap->pg_temp, pgid);
1134 if (pg) { 1134 if (pg) {
1135 *num = pg->len; 1135 *num = pg->len;