target: replace se_cmd->execute_rw with a protocol_data field

Instead of leaking this SBC read/write implementation detail just add an
opaqueue protocol specific pointer to struct se_cmd that we can assign
the sbc_ops vector to.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Christoph Hellwig
2015-06-19 15:10:58 +02:00
committed by Nicholas Bellinger
parent e2e21bd8f9
commit 7a971b1b30
2 changed files with 8 additions and 15 deletions

View File

@@ -490,9 +490,8 @@ struct se_cmd {
struct kref cmd_kref;
const struct target_core_fabric_ops *se_tfo;
sense_reason_t (*execute_cmd)(struct se_cmd *);
sense_reason_t (*execute_rw)(struct se_cmd *, struct scatterlist *,
u32, enum dma_data_direction);
sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool);
void *protocol_data;
unsigned char *t_task_cdb;
unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE];