stgt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hitoshi Mitake <mitake.hitoshi@gmail.com>
To: stgt@vger.kernel.org
Cc: mitake.hitoshi@gmail.com, Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Subject: Re: [PATCH] tgtd: let conn_close() transfer state of a connection
Date: Wed, 19 Feb 2014 13:13:28 +0900	[thread overview]
Message-ID: <87mwhnagev.wl%mitake.hitoshi@lab.ntt.co.jp> (raw)
In-Reply-To: <1392624749-18940-1-git-send-email-mitake.hitoshi@lab.ntt.co.jp>

At Mon, 17 Feb 2014 17:12:29 +0900,
Hitoshi Mitake wrote:
> 
> Current tgtd seems to have a possibility that it has a connection
> whose state isn't STATE_CLOSE even after the connection is passed to
> conn_close(). Such a connection is confusing because
> iscsi_scsi_cmd_done() cannot detect the closing of the connection.
> 
> This patch lets conn_close() transfer state of a connection to
> STATE_CLOSE for avoiding this purpose.
> 
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
> ---
>  usr/iscsi/conn.c |    2 ++
>  1 file changed, 2 insertions(+)

Please ignore this one. This patch aims to solve the problem which
becomes obvious when the parallelizing PDU send/recv patchset is
applied.

Thanks,
Hitoshi

> 
> diff --git a/usr/iscsi/conn.c b/usr/iscsi/conn.c
> index bb18ac0..cfd6b3e 100644
> --- a/usr/iscsi/conn.c
> +++ b/usr/iscsi/conn.c
> @@ -88,6 +88,8 @@ void conn_close(struct iscsi_connection *conn)
>  	struct iscsi_task *task, *tmp;
>  	int ret;
>  
> +	conn->state = STATE_CLOSE;
> +
>  	if (conn->closed) {
>  		eprintf("already closed %p %u\n", conn, conn->refcount);
>  		return;
> -- 
> 1.7.10.4
> 

      reply	other threads:[~2014-02-19  4:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17  8:12 [PATCH] tgtd: let conn_close() transfer state of a connection Hitoshi Mitake
2014-02-19  4:13 ` Hitoshi Mitake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mwhnagev.wl%mitake.hitoshi@lab.ntt.co.jp \
    --to=mitake.hitoshi@gmail.com \
    --cc=mitake.hitoshi@lab.ntt.co.jp \
    --cc=stgt@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).