[sheepdog-users] dead code?

Liu Yuan namei.unix at gmail.com
Fri Jul 20 09:50:49 CEST 2012


On 07/20/2012 01:54 PM, Dietmar Maurer wrote:
> just found the following in group.c (line 796);
> 
> 	if (msg->cluster_status == SD_STATUS_OK ||
> 	    msg->cluster_status == SD_STATUS_HALT) {
> 		if (msg->inc_epoch) {
> 			uatomic_inc(&sys->epoch);
> 			log_current_epoch();
> 		}
> 		/* Fresh node */
> 		if (!sys_stat_ok() && !sys_stat_halt()) {
> 
> Seems this is never triggered, because above condition make sure the one 
> of those flags is always set?
> 
> - Dietmar
> 
> 

Why? cluster_status can be WAIT_FOR_JOIN OR WAIT_FOR_FORMAT.

Thanks,
Yuan



More information about the sheepdog-users mailing list