]> git.openfabrics.org - ~emulex/infiniband.git/commit
ib_srpt: Convert I/O path to target_submit_cmd + drop legacy ioctx->kref
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 28 Nov 2012 07:55:57 +0000 (23:55 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 28 Nov 2012 09:10:59 +0000 (01:10 -0800)
commit9474b043132f41ee03bd3d8dcb076f8569ae69d3
treefbeab82e5c98b57bca9177353c730fc5ac7d0dd3
parentffe0067544f93c0e71c793d7f17240486d091a3c
ib_srpt: Convert I/O path to target_submit_cmd + drop legacy ioctx->kref

This patch converts the main srpt_handle_cmd() I/O path to use modern
target_submit_cmd() with TARGET_SCF_ACK_KREF flag usage.  This includes
dropping the original internal ioctx->kref + srpt_put_send_ioctx() usage
in favor of target_put_sess_cmd() w/ se_cmd_t->cmd_kref within ib_srpt
response callbacks.

It also updates srpt_abort_cmd() to call target_put_sess_cmd() for
completion of aborted commands, and adds target_wait_for_sess_cmds() into
srpt_release_channel_work() to allow outstanding I/O to complete during
session shutdown.

Also, go ahead and update srpt_handle_tsk_mgmt() to make the remaining
transport_init_se_cmd() to setup the ioctx->cmd with se_tmr_req.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Roland Dreier <roland@kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h