[Stgt-devel] close completes before synchronize cache response

Alexander Nezhinsky nezhinsky
Sat Sep 1 10:14:07 CEST 2007

> Of course the initiatior should be waiting for the cache flush to
> complete on the target.  I just assumed it was something in the target.

In this case it was an initiator problem, as Mike explained, but regarding
your previous question:

> Can we delay the close until all command responses have been
> sent somehow?

it seems that we can't do it anyway, because it contradicts what iscsi
spec says (10.14):
"When receiving a Logout Request with the reason code of "close the
connection" or "close the session", the target MUST terminate all
pending commands".

Even in the case of a logout with connection recovery, when the target retains
some of the commands, it should not explicitly wait for their completion as it:
"MUST discard all requests not yet acknowledged via ExpCmdSN ...,
and suspend all data/status/R2T transfers on behalf of pending commands"

More information about the stgt mailing list