aboutsummaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-06-17 18:40:52 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-07-16 17:29:12 -0700
commit0c2ad7d1132d8b089b1d37875917858e03610019 (patch)
treee86cc118497605026a15c0e97630c57aeb625793 /include/target
parente1306bdab3af8bef620990a99e613f99eb30065c (diff)
target: add struct spc_ops + initial ->execute_rw pointer usage
Remove the execute_cmd method in struct se_subsystem_api, and always use the one directly in struct se_cmd. To make life simpler for SBC virtual backends a struct spc_ops that is passed to sbc_parse_cmd is added. For now it only contains an execute_rw member, but more will follow with the subsequent commits. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_backend.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h
index 24d2004f0d1..9b4f2c92ed5 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -26,8 +26,6 @@ struct se_subsystem_api {
int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *);
int (*parse_cdb)(struct se_cmd *cmd);
- int (*execute_cmd)(struct se_cmd *, struct scatterlist *, u32,
- enum dma_data_direction);
int (*do_discard)(struct se_device *, sector_t, u32);
void (*do_sync_cache)(struct se_cmd *);
ssize_t (*check_configfs_dev_params)(struct se_hba *,
@@ -42,6 +40,10 @@ struct se_subsystem_api {
unsigned char *(*get_sense_buffer)(struct se_cmd *);
};
+struct spc_ops {
+ int (*execute_rw)(struct se_cmd *cmd);
+};
+
int transport_subsystem_register(struct se_subsystem_api *);
void transport_subsystem_release(struct se_subsystem_api *);
@@ -51,7 +53,7 @@ struct se_device *transport_add_device_to_core_hba(struct se_hba *,
void target_complete_cmd(struct se_cmd *, u8);
-int sbc_parse_cdb(struct se_cmd *cmd);
+int sbc_parse_cdb(struct se_cmd *cmd, struct spc_ops *ops);
int spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *);