diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-11-19 05:36:22 +0100 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-12-14 12:40:56 +0100 |
commit | a63607855224702ea17e6016ecf3f7d544e83625 (patch) | |
tree | 844d9a7dbdc636ba657763f04945b91ca8da9ba7 /drivers/target/tcm_fc | |
parent | target: Make target_put_sess_cmd use target_release_cmd_kref (diff) | |
download | linux-a63607855224702ea17e6016ecf3f7d544e83625.tar.xz linux-a63607855224702ea17e6016ecf3f7d544e83625.zip |
target: Add target_submit_cmd() for process context fabric submission
This patch adds a target_submit_cmd() caller that can be used by fabrics
to submit an uninitialized se_cmd descriptor to an struct se_session +
unpacked_lun from workqueue process context. This call will invoke the
following steps:
- transport_init_se_cmd() to setup se_cmd specific pointers
- Obtain se_cmd->cmd_kref references with target_get_sess_cmd()
- set se_cmd->t_tasks_bidi
- transport_lookup_cmd_lun() to setup struct se_cmd->se_lun from
the passed unpacked_lun
- transport_generic_allocate_tasks() to setup the passed *cdb, and
- transport_handle_cdb_direct() handle READ dispatch or WRITE
ready-to-transfer callback to fabric
v2 changes from hch feedback:
*) Add target_sc_flags_table for target_submit_cmd flags
*) Rename bidi parameter to flags, add TARGET_SCF_BIDI_OP
*) Convert checks to BUG_ON
*) Add out_check_cond for transport_send_check_condition_and_sense
usage
v3 changes:
*) Add TARGET_SCF_ACK_KREF for target_submit_cmd into
target_get_sess_cmd to determine when the fabric caller is expecting
a second kref_put() from fabric packet acknowledgement.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc')
0 files changed, 0 insertions, 0 deletions