linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IB/isert: Return value of iser target transport handlers ignored by iscsi target
@ 2016-08-04 10:35 Potnuri Bharat Teja
  2016-08-07 17:09 ` Sagi Grimberg
  0 siblings, 1 reply; 3+ messages in thread
From: Potnuri Bharat Teja @ 2016-08-04 10:35 UTC (permalink / raw)
  To: sagi, nab; +Cc: target-devel, linux-scsi, swise, varun, rajur

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-18 12:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 10:35 IB/isert: Return value of iser target transport handlers ignored by iscsi target Potnuri Bharat Teja
2016-08-07 17:09 ` Sagi Grimberg
2016-08-18 12:03   ` Potnuri Bharat Teja

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).