[sheepdog-users] is --nohalt dangerous?

Liu Yuan namei.unix at gmail.com
Wed Jul 18 09:06:33 CEST 2012


On 07/18/2012 03:03 PM, Dietmar Maurer wrote:
> So maybe the following would make --nohalt a bit safer?
> 
> diff --git a/sheep/group.c b/sheep/group.c
> index 059656e..e9e2861 100644
> --- a/sheep/group.c
> +++ b/sheep/group.c
> @@ -1079,6 +1079,9 @@ void sd_leave_handler(struct sd_node *left, struct sd_node
>         if (sys_can_halt()) {
>                 if (current_vnode_info->nr_zones < sys->nr_copies)
>                         sys_stat_set(SD_STATUS_HALT);
> +       } else {
> +               if (current_vnode_info->nr_zones <= (sys->nr_copies/2))
> +                       sys_stat_set(SD_STATUS_HALT);
>         }
>  
>         sockfd_cache_del(&left->nid);

I don't think we should relax the halt condition, nr_zones >= nr_copies
is the safest condition.

Thanks,
Yuan




More information about the sheepdog-users mailing list