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/vhost | |
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/vhost')
-rw-r--r-- | drivers/vhost/tcm_vhost.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 94e6e04aecf2..89dc99baca80 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/vhost/tcm_vhost.c | |||
@@ -330,12 +330,6 @@ static int tcm_vhost_queue_tm_rsp(struct se_cmd *se_cmd) | |||
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | static u16 tcm_vhost_set_fabric_sense_len(struct se_cmd *se_cmd, | ||
334 | u32 sense_length) | ||
335 | { | ||
336 | return 0; | ||
337 | } | ||
338 | |||
339 | static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd) | 333 | static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd) |
340 | { | 334 | { |
341 | struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; | 335 | struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; |
@@ -1526,7 +1520,6 @@ static struct target_core_fabric_ops tcm_vhost_ops = { | |||
1526 | .queue_data_in = tcm_vhost_queue_data_in, | 1520 | .queue_data_in = tcm_vhost_queue_data_in, |
1527 | .queue_status = tcm_vhost_queue_status, | 1521 | .queue_status = tcm_vhost_queue_status, |
1528 | .queue_tm_rsp = tcm_vhost_queue_tm_rsp, | 1522 | .queue_tm_rsp = tcm_vhost_queue_tm_rsp, |
1529 | .set_fabric_sense_len = tcm_vhost_set_fabric_sense_len, | ||
1530 | /* | 1523 | /* |
1531 | * Setup callers for generic logic in target_core_fabric_configfs.c | 1524 | * Setup callers for generic logic in target_core_fabric_configfs.c |
1532 | */ | 1525 | */ |