diff options
author | Roland Dreier <roland@purestorage.com> | 2012-08-15 17:35:25 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-09-17 20:12:58 -0400 |
commit | 9c58b7ddd70dd7bfaac4ca87131f36d10aaba441 (patch) | |
tree | 2796f11c283904cef9b38f543e31fed3fea565c7 /Documentation | |
parent | 2ed772b7b9df0f459308b3cbececc0136076d09e (diff) |
target: Simplify fabric sense data length handling
Every fabric driver has to supply a se_tfo->set_fabric_sense_len()
method, just so iSCSI can return an offset of 2. However, every fabric
driver is already allocating a sense buffer and passing it into the
target core, either via transport_init_se_cmd() or target_submit_cmd().
So instead of having iSCSI pass the start of its sense buffer into the
core and then later tell the core to skip the first 2 bytes, it seems
easier for iSCSI just to do the offset of 2 when it passes the sense
buffer into the core. Then we can drop the se_tfo->set_fabric_sense_len()
everywhere, and just add a couple of lines of code to iSCSI to set the
sense data length to the beginning of the buffer right before it sends
it over the network.
(nab: Remove .set_fabric_sense_len usage from tcm_qla2xxx_npiv_ops +
change transport_get_sense_buffer to follow v3.6-rc6 code w/o
->set_fabric_sense_len usage)
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'Documentation')
-rwxr-xr-x | Documentation/target/tcm_mod_builder.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py index 13652381cb71..3fe0d812dcec 100755 --- a/Documentation/target/tcm_mod_builder.py +++ b/Documentation/target/tcm_mod_builder.py | |||
@@ -402,7 +402,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
402 | buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" | 402 | buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" |
403 | buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" | 403 | buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" |
404 | buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" | 404 | buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" |
405 | buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n" | ||
406 | buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" | 405 | buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" |
407 | buf += " /*\n" | 406 | buf += " /*\n" |
408 | buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n" | 407 | buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n" |
@@ -905,13 +904,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
905 | buf += "}\n\n" | 904 | buf += "}\n\n" |
906 | bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n" | 905 | bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n" |
907 | 906 | ||
908 | if re.search('set_fabric_sense_len\)\(', fo): | ||
909 | buf += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)\n" | ||
910 | buf += "{\n" | ||
911 | buf += " return 0;\n" | ||
912 | buf += "}\n\n" | ||
913 | bufi += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *, u32);\n" | ||
914 | |||
915 | if re.search('is_state_remove\)\(', fo): | 907 | if re.search('is_state_remove\)\(', fo): |
916 | buf += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *se_cmd)\n" | 908 | buf += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *se_cmd)\n" |
917 | buf += "{\n" | 909 | buf += "{\n" |