summaryrefslogtreecommitdiff
path: root/include/linux/t10-pi.h
diff options
context:
space:
mode:
authorMax Gurtovoy <maxg@mellanox.com>2018-07-30 00:15:32 +0300
committerJens Axboe <axboe@kernel.dk>2018-07-30 17:27:02 +0300
commit10c41ddd61323b27b447bc8e18296ac6c06107ad (patch)
tree116e298295cfafda21080e0c83b501862753fcf1 /include/linux/t10-pi.h
parentddd0bc756983dc4d19000a4fe021b4c7f9d59aab (diff)
downloadlinux-10c41ddd61323b27b447bc8e18296ac6c06107ad.tar.xz
block: move dif_prepare/dif_complete functions to block layer
Currently these functions are implemented in the scsi layer, but their actual place should be the block layer since T10-PI is a general data integrity feature that is used in the nvme protocol as well. Also, use the tuple size from the integrity profile since it may vary between integrity types. Suggested-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Max Gurtovoy <maxg@mellanox.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/t10-pi.h')
-rw-r--r--include/linux/t10-pi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/t10-pi.h b/include/linux/t10-pi.h
index c40511f4e63d..5a427c289f58 100644
--- a/include/linux/t10-pi.h
+++ b/include/linux/t10-pi.h
@@ -51,5 +51,8 @@ extern const struct blk_integrity_profile t10_pi_type1_crc;
extern const struct blk_integrity_profile t10_pi_type1_ip;
extern const struct blk_integrity_profile t10_pi_type3_crc;
extern const struct blk_integrity_profile t10_pi_type3_ip;
+extern void t10_pi_prepare(struct request *rq, u8 protection_type);
+extern void t10_pi_complete(struct request *rq, u8 protection_type,
+ unsigned int intervals);
#endif