All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc
@ 2013-08-29  0:19 Sage Weil
  2013-08-29 14:24 ` Alex Elder
  0 siblings, 1 reply; 2+ messages in thread
From: Sage Weil @ 2013-08-29  0:19 UTC (permalink / raw)
  To: ceph-devel; +Cc: Sage Weil, stable

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: Sage Weil <sage@inktank.com>
---
 net/ceph/osdmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 603ddd9..dbd9a47 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;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc
  2013-08-29  0:19 [PATCH] libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc Sage Weil
@ 2013-08-29 14:24 ` Alex Elder
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2013-08-29 14:24 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel, stable

On 08/28/2013 07:19 PM, Sage Weil wrote:
> 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.

Looks good to me.  The other two uses of pgp_num_mask are coupled with
pgp_num (not pg_num) in a ceph_stable_mod() call.

Reviewed-by: Alex Elder <elder@linaro.org>

> CC: stable@vger.kernel.org
> Signed-off-by: Sage Weil <sage@inktank.com>
> ---
>  net/ceph/osdmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
> index 603ddd9..dbd9a47 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;
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-29 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29  0:19 [PATCH] libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc Sage Weil
2013-08-29 14:24 ` Alex Elder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.