diff options
author | Asias He <asias@redhat.com> | 2013-02-25 14:03:46 +0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-04-25 01:05:24 -0700 |
commit | 86d7182985d25900929adce14fffd729cc8c6fb8 (patch) | |
tree | 8e5e755c5badf3a09b5b0c4e6c2f76c72c080dcf /include/target | |
parent | dbc21c5abbeb4419da5a54157c4b7a0ec0dee185 (diff) | |
download | linux-stable-86d7182985d25900929adce14fffd729cc8c6fb8.tar.gz linux-stable-86d7182985d25900929adce14fffd729cc8c6fb8.tar.bz2 linux-stable-86d7182985d25900929adce14fffd729cc8c6fb8.zip |
target: Add sbc_execute_unmap() helper
iblock_execute_unmap() and fd_execute_unmap share a lot of code.
Add sbc_execute_unmap() helper to remove duplicated code for
iblock_execute_unmap() and fd_execute_unmap().
Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Asias He <asias@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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index b128c20770bc..ffa2696d64dc 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -60,6 +60,10 @@ 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 transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); |