summaryrefslogtreecommitdiffstats
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 20:29:12 -0400
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 24d2004f0d12..9b4f2c92ed53 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -26,8 +26,6 @@ struct se_subsystem_api {
26 int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *); 26 int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *);
27 27
28 int (*parse_cdb)(struct se_cmd *cmd); 28 int (*parse_cdb)(struct se_cmd *cmd);
29 int (*execute_cmd)(struct se_cmd *, struct scatterlist *, u32,
30 enum dma_data_direction);
31 int (*do_discard)(struct se_device *, sector_t, u32); 29 int (*do_discard)(struct se_device *, sector_t, u32);
32 void (*do_sync_cache)(struct se_cmd *); 30 void (*do_sync_cache)(struct se_cmd *);
33 ssize_t (*check_configfs_dev_params)(struct se_hba *, 31 ssize_t (*check_configfs_dev_params)(struct se_hba *,
@@ -42,6 +40,10 @@ struct se_subsystem_api {
42 unsigned char *(*get_sense_buffer)(struct se_cmd *); 40 unsigned char *(*get_sense_buffer)(struct se_cmd *);
43}; 41};
44 42
43struct spc_ops {
44 int (*execute_rw)(struct se_cmd *cmd);
45};
46
45int transport_subsystem_register(struct se_subsystem_api *); 47int transport_subsystem_register(struct se_subsystem_api *);
46void transport_subsystem_release(struct se_subsystem_api *); 48void transport_subsystem_release(struct se_subsystem_api *);
47 49
@@ -51,7 +53,7 @@ struct se_device *transport_add_device_to_core_hba(struct se_hba *,
51 53
52void target_complete_cmd(struct se_cmd *, u8); 54void target_complete_cmd(struct se_cmd *, u8);
53 55
54int sbc_parse_cdb(struct se_cmd *cmd); 56int sbc_parse_cdb(struct se_cmd *cmd, struct spc_ops *ops);
55int spc_parse_cdb(struct se_cmd *cmd, unsigned int *size); 57int spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
56 58
57void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); 59void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *);