On Sun, 2011-11-06 at 12:26 +0100, Bart Van Assche wrote: > On Sun, Nov 6, 2011 at 11:46 AM, Nicholas A. Bellinger > <nab@xxxxxxxxxxxxxxx> wrote: > > On Sun, 2011-11-06 at 09:13 +0100, Bart Van Assche wrote: > > > This leaves the possibility open that ch->sess is used by > > > srpt_handle_new_iu() while transport_deregister_session() is in > > > progress. That's a race condition. > > > > Is there already a way to quiesce incoming I/O for an channel before > > invoking srpt_release_channel()..? What about srpt_drain_channel()..? > > The proper way to stop I/O is to invoke srpt_close_ch() and to wait > for the last WQE event. After that event has been received and after > the CQ has been drained it is guaranteed that no new commands will be > passed by ib_srpt to the LIO core. > OK, thanks for the background. I'll take a look at adding what is required for ->last_wqe_received, as what you've ended up with is different from what is in your original r3870 commit to address the issue. I'll send out a patch for review later this afternoon. Thanks, --nab -- 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