On 01/14/2016 09:28 AM, Christoph Hellwig wrote:
Hi Nic,
below is my idea how to kill ->shutdown_session. It also happens to remove
the need for sess_kref and simplify a few more things.
Note that qla2xxx won't compile with this series - it has some very creative
abuse of sess_kfree.
Quinn, can you take a look at the sess_kfree usage in qla2xxx? It uses it
with it's own release function passed to kref_put, which I can't see how
it's supposed to work. Maybe it should be using a kref in it's private
session structure instead?
Hello Christoph,
These patches look interesting to me but I would appreciate it if an
additional aspect would be addressed by this patch series. How about
inserting a patch before patch 1/5 that makes the target core set a flag
with the meaning "shutdown_session()" has been called instead of relying
on sess_tearing_down ? The current implementation of the target core is
based on the assumption that the shutdown_session() callback calls
target_sess_cmd_list_set_waiting(). I'd like to get rid of this
assumption such that I can move that call in the ib_srpt and tcm_qla2xxx
drivers from the shutdown_session() callback to
srpt_release_channel_work(). These two drivers are namely the only
drivers for which the target_sess_cmd_list_set_waiting() and
target_wait_for_sess_cmds() calls occur from different functions. The
next step would be to merge these two functions into a single function.
Thanks,
Bart.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html