linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Potnuri Bharat Teja <bharat@chelsio.com>
To: sagi@grimberg.me, nab@linux-iscsi.org
Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
	swise@opengridcomputing.com, varun@chelsio.com,
	rajur@chelsio.com
Subject: IB/isert: Return value of iser target transport handlers ignored by iscsi target
Date: Thu, 4 Aug 2016 16:05:07 +0530	[thread overview]
Message-ID: <20160804103506.GA29543@t5fpga-b1.asicdesigners.com> (raw)

Hi,
In iSER target during iwarp connection tear-down due to ping timeouts, the rdma
queues are set to error state and subsequent queued iscsi session commands posted 
shall fail with corresponding errno returned by ib_post_send/recv. 
At this stage iser target handlers (Ex: isert_put_datain())
return the error to iscsci target, but these errors are 
not being handled by the iscsi target handlers(Ex: lio_queue_status()).

-> While closing the session in case of ping timeouts, isert_close_connection()-> 
isert_wait_conn()->isert_wait4cmds() checks for the queued session commands 
and waits infinitely for command completion 'cmd_wait_comp' in target_wait_for_sess_cmds().
'cmd_wait_comp' will be never complete as the kref on the session command is 
not derefed, due to which target_release_cmd_kref() is not called by kref_put().
Due to this, the older session is not cleared causing the next login negotiation to fail
as the older session is still active(Older SID exists).

[Query 1] If the return value of ib_post_send/recv() are handled to deref the
corresponding queued session commands, the wait on cmd_wait_comp will be
complete and clears off the session successfully. Is this the rightway to
do it here?

[Query 2] An extra deref is done in case of transport_status CMD_T_TAS 
in target_wait_for_sess_cmds(), can similar 
implementation be done for transport state CMD_T_FABRIC_STOP?

Can someone shed some light on these aspects.
Thanks in advance.


Thanks,
Bharat.

             reply	other threads:[~2016-08-04 10:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 10:35 Potnuri Bharat Teja [this message]
2016-08-07 17:09 ` IB/isert: Return value of iser target transport handlers ignored by iscsi target Sagi Grimberg
2016-08-18 12:03   ` Potnuri Bharat Teja

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=20160804103506.GA29543@t5fpga-b1.asicdesigners.com \
    --to=bharat@chelsio.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=rajur@chelsio.com \
    --cc=sagi@grimberg.me \
    --cc=swise@opengridcomputing.com \
    --cc=target-devel@vger.kernel.org \
    --cc=varun@chelsio.com \
    /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 NNTP newsgroup(s).