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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user