diff options
author | Christoph Hellwig <hch@lst.de> | 2015-06-19 15:10:59 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-06-23 00:43:44 -0700 |
commit | 62e4694256dd3cbe301ebc0da799df8779b97014 (patch) | |
tree | 4d0900d5d8d2dcb5acd2f1e2d390c9d18e1e0629 /include/target | |
parent | 7a971b1b3055f0e76ff09b8fd0dd809ea3b48279 (diff) | |
download | linux-62e4694256dd3cbe301ebc0da799df8779b97014.tar.bz2 |
target: simplify UNMAP handling
Move a little more processing into the core code, and lift the previous
do_unmap callback into the sbc_ops structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_backend.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 566c7d27f6d0..ff399369a21a 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -50,7 +50,8 @@ struct sbc_ops { sense_reason_t (*execute_sync_cache)(struct se_cmd *cmd); sense_reason_t (*execute_write_same)(struct se_cmd *cmd); sense_reason_t (*execute_write_same_unmap)(struct se_cmd *cmd); - sense_reason_t (*execute_unmap)(struct se_cmd *cmd); + sense_reason_t (*execute_unmap)(struct se_cmd *cmd, + sector_t lba, sector_t nolb); }; int transport_backend_register(const struct target_backend_ops *); @@ -68,10 +69,6 @@ sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops); u32 sbc_get_device_rev(struct se_device *dev); u32 sbc_get_device_type(struct se_device *dev); sector_t sbc_get_write_same_sectors(struct se_cmd *cmd); -sense_reason_t sbc_execute_unmap(struct se_cmd *cmd, - sense_reason_t (*do_unmap_fn)(struct se_cmd *cmd, void *priv, - sector_t lba, sector_t nolb), - void *priv); void sbc_dif_generate(struct se_cmd *); sense_reason_t sbc_dif_verify(struct se_cmd *, sector_t, unsigned int, unsigned int, struct scatterlist *, int); |