[Ocfs2-devel] [patch 03/10] ocfs2: o2net: don't shutdown connection when idle timeout

Mark Fasheh mfasheh at suse.de
Wed Aug 13 23:16:00 PDT 2014


On Thu, Aug 14, 2014 at 01:59:49PM +0800, Junxiao Bi wrote:
> >>  static void o2net_sc_postpone_idle(struct o2net_sock_container *sc)
> >>  {
> >> +	struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
> >> +
> >> +	/* clear fence decision since the connection recover from timeout*/
> >> +	if (atomic_read(&nn->nn_timeout)) {
> >> +		o2quo_conn_up(o2net_num_from_nn(nn));
> >> +		cancel_delayed_work(&nn->nn_still_up);
> > This might sound silly (since there's a chance the node is killed) but what
> > about the return value of cancel_delayed_work() here? There's a chance the
> > delayed work couldn't be canceled, does that impact the patch in any
> > negative manner?
> The return value don't need to be taken care.
> Two cases:
> 1) If the work is still pending, then the function will cancel it and
> return true.
>     no problem.
> 2) If the work is running, the function will return false. If cluster is
> in split-brain,
> then the work will do nothing, else this node will be fenced, this means
> the net
> revert too late. So this case also can't affect the following patch manner.

Ok, that makes sense - thanks.

Reviewed-by: Mark Fasheh <mfasheh at suse.de>
	--Mark

--
Mark Fasheh



More information about the Ocfs2-devel mailing list