diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-06-17 18:40:54 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-07-16 20:34:41 -0400 |
commit | 6f974e8ce7b3f661910a49c7c2ba095631f341e9 (patch) | |
tree | 5698f1ed849b92eec547571594a68183c592b590 /include/target | |
parent | ad67f0d9e63ca94661e06a145f05a9302368a826 (diff) |
target: move write_same to struct spc_ops
Add spc_ops->execute_write_same() caller for ->execute_cmd() setup,
and update IBLOCK backends to use it.
(nab: add export of spc_get_write_same_sectors symbol)
(roland: Carry forward: Fix range calculation in WRITE SAME emulation
when num blocks == 0)
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 5797b1164c80..fbc6a1b8b99a 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -42,6 +42,7 @@ struct se_subsystem_api { | |||
42 | struct spc_ops { | 42 | struct spc_ops { |
43 | int (*execute_rw)(struct se_cmd *cmd); | 43 | int (*execute_rw)(struct se_cmd *cmd); |
44 | int (*execute_sync_cache)(struct se_cmd *cmd); | 44 | int (*execute_sync_cache)(struct se_cmd *cmd); |
45 | int (*execute_write_same)(struct se_cmd *cmd); | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | int transport_subsystem_register(struct se_subsystem_api *); | 48 | int transport_subsystem_register(struct se_subsystem_api *); |
@@ -55,6 +56,7 @@ void target_complete_cmd(struct se_cmd *, u8); | |||
55 | 56 | ||
56 | int sbc_parse_cdb(struct se_cmd *cmd, struct spc_ops *ops); | 57 | int sbc_parse_cdb(struct se_cmd *cmd, struct spc_ops *ops); |
57 | int spc_parse_cdb(struct se_cmd *cmd, unsigned int *size); | 58 | int spc_parse_cdb(struct se_cmd *cmd, unsigned int *size); |
59 | int spc_get_write_same_sectors(struct se_cmd *cmd); | ||
58 | 60 | ||
59 | void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); | 61 | void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); |
60 | int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); | 62 | int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); |