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 /drivers/target/sbp | |
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 'drivers/target/sbp')
-rw-r--r-- | drivers/target/sbp/sbp_target.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c index cb40a40326cd..4d9797744637 100644 --- a/drivers/target/sbp/sbp_target.c +++ b/drivers/target/sbp/sbp_target.c | |||
@@ -1847,11 +1847,6 @@ static int sbp_queue_tm_rsp(struct se_cmd *se_cmd) | |||
1847 | return 0; | 1847 | return 0; |
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | static u16 sbp_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length) | ||
1851 | { | ||
1852 | return 0; | ||
1853 | } | ||
1854 | |||
1855 | static int sbp_check_stop_free(struct se_cmd *se_cmd) | 1850 | static int sbp_check_stop_free(struct se_cmd *se_cmd) |
1856 | { | 1851 | { |
1857 | struct sbp_target_request *req = container_of(se_cmd, | 1852 | struct sbp_target_request *req = container_of(se_cmd, |
@@ -2529,7 +2524,6 @@ static struct target_core_fabric_ops sbp_ops = { | |||
2529 | .queue_data_in = sbp_queue_data_in, | 2524 | .queue_data_in = sbp_queue_data_in, |
2530 | .queue_status = sbp_queue_status, | 2525 | .queue_status = sbp_queue_status, |
2531 | .queue_tm_rsp = sbp_queue_tm_rsp, | 2526 | .queue_tm_rsp = sbp_queue_tm_rsp, |
2532 | .set_fabric_sense_len = sbp_set_fabric_sense_len, | ||
2533 | .check_stop_free = sbp_check_stop_free, | 2527 | .check_stop_free = sbp_check_stop_free, |
2534 | 2528 | ||
2535 | .fabric_make_wwn = sbp_make_tport, | 2529 | .fabric_make_wwn = sbp_make_tport, |