Hi Mike,

Is there an update about this commit?
About the decision between adding actor_delete or using queue_delayed_reopen.

Thanks,
Roi


-----Original Message-----
From: Mike Christie [mailto:[email protected]] 
Sent: Tuesday, June 10, 2014 8:10 PM
To: [email protected]
Cc: Ariel Nahum; Roi Dayan
Subject: Re: [PATCH] Fix infinite loop when conn bind fails

On 06/09/2014 01:44 AM, Ariel Nahum wrote:
> Currently, when conn bind fails, iscsi_conn_connect is called and it 
> reschedules the login_timer by adding it to the pending list while 
> it's actually already there. This will create an infinite loop when 
> the pending list is processed.
> 
> To fix that, use queue_delayed_reopen which first calls actor_delete 
> to make sure the actor is not in the list before rescheduling it.
> 
> Signed-off-by: Ariel Nahum <[email protected]>
> Signed-off-by: Roi Dayan <[email protected]>
> ---
>  usr/initiator.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/usr/initiator.c b/usr/initiator.c index 05a5b19..067cf0a 
> 100644
> --- a/usr/initiator.c
> +++ b/usr/initiator.c
> @@ -543,8 +543,7 @@ static int iscsi_conn_connect(struct iscsi_conn *conn, 
> queue_task_t *qtask)
>       iscsi_sched_ev_context(ev_context, conn, 0, EV_CONN_POLL);
>       log_debug(3, "Setting login timer %p timeout %d", &conn->login_timer,
>                 conn->login_timeout);
> -     actor_timer(&conn->login_timer, conn->login_timeout * 1000,
> -                 iscsi_login_timedout, qtask);
> +     queue_delayed_reopen(qtask, conn->login_timeout);
>       return 0;
>  }

Patch is correct. Thanks.

I am just trying to think of a better name for queue_delayed_reopen or maybe if 
we want to just add a actor_delete in iscsi_connect. When we call it above, the 
name of the function is odd since we are not requeueing the reopn. In this code 
path we use the login_timer to monitor the connect/login process. When other 
callers of queue_delayed_reopen call it, they are reusing the login_timer as a 
generic timer to retry connect/login.

Give me another day to think about it.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to