Re: [PATCH 30/33] libceph: add support for primary_temp mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/27/2014 01:18 PM, Ilya Dryomov wrote:
> Change apply_temp() to override primary in the same way pg_temp
> overrides osd set.  primary_temp overrides pg_temp primary too.

Looks good.

Reviewed-by: Alex Elder <elder@xxxxxxxxxx>

> Signed-off-by: Ilya Dryomov <ilya.dryomov@xxxxxxxxxxx>
> ---
>  net/ceph/osdmap.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
> index 7193b012ee02..ed52b47d0ddb 100644
> --- a/net/ceph/osdmap.c
> +++ b/net/ceph/osdmap.c
> @@ -1590,7 +1590,7 @@ static int raw_to_up_osds(struct ceph_osdmap *osdmap,
>  }
>  
>  /*
> - * Given up set, apply pg_temp mapping.
> + * Given up set, apply pg_temp and primary_temp mappings.
>   *
>   * Return acting set length.  *primary is set to acting primary osd id,
>   * or -1 if acting set is empty.
> @@ -1637,6 +1637,11 @@ static int apply_temps(struct ceph_osdmap *osdmap,
>  		temp_primary = *primary;
>  	}
>  
> +	/* primary_temp? */
> +	pg = __lookup_pg_mapping(&osdmap->primary_temp, pgid);
> +	if (pg)
> +		temp_primary = pg->primary_temp.osd;
> +
>  	*primary = temp_primary;
>  	return temp_len;
>  }
> 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux