At Wed, 26 Nov 2014 17:56:34 +0900,
Hitoshi Mitake wrote:
>
> In a case of nr_zones < nr_copies of deleted VDI, current sheep panics
> because it cannot obtain correct list of nodes which hold target
> ledgers. This patch solves the problem.
>
> Reported-by: Valerio Pachera <[email protected]>
> Cc: Valerio Pachera <[email protected]>
> Signed-off-by: Hitoshi Mitake <[email protected]>
> ---
> sheep/ops.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Valerio, could you test it when you have time?
Thanks,
Hitoshi
>
> diff --git a/sheep/ops.c b/sheep/ops.c
> index 4b54780..babdc47 100644
> --- a/sheep/ops.c
> +++ b/sheep/ops.c
> @@ -1196,10 +1196,9 @@ int peer_decref_object(struct request *req)
> if (is_zero_ledger(ledger)) {
> struct sd_node *nodes[SD_MAX_COPIES];
> int nr_copies;
> - uint32_t vid;
>
> - vid = oid_to_vid(ledger_oid);
> - nr_copies = get_vdi_copy_number(vid);
> + nr_copies = get_obj_copy_number(ledger_oid,
> + req->vinfo->nr_zones);
> memset(nodes, 0, sizeof(nodes));
>
> /* reclaim object */
> --
> 1.8.3.2
>
--
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog