Re: iscsi_trx going into D state

Christoph Hellwig
2016-10-04T11:46:42Z

On Tue, Oct 04, 2016 at 11:11:18AM +0200, Hannes Reinecke wrote:
> Hmm. Looking at the code it looks as we might miss some calls to
> 'complete'. Can you try with the attached patch?

That only looks slightly better than the original. What this really
needs is a waitqueue and and waitevent on sess->ncon. Although
that will need a bit more refactoring around that code. There also
are a few more ovbious issues around it, e.g. iscsit_close_connection
needs to use atomic_dec_and_test on sess->nconn instead of having
separate atomic_dec and atomic_read calls, and a lot of the 0 or 1
atomic_ts in this code should be replaced with atomic bitops.

Btw, there also was a fix from Lee in this area that added a missing
wakeup, make sure your tree already has that.