summaryrefslogtreecommitdiff
path: root/drivers/scsi/sd_dif.c
diff options
context:
space:
mode:
authorMax Gurtovoy <maxg@mellanox.com>2018-07-30 00:15:31 +0300
committerJens Axboe <axboe@kernel.dk>2018-07-30 08:27:01 -0600
commitddd0bc756983dc4d19000a4fe021b4c7f9d59aab (patch)
treec60de4ff47106f0c20b1f1beda9df7eedbdc8b86 /drivers/scsi/sd_dif.c
parentc454edc21b12dd7d416de6c81555e87aaec9685c (diff)
block: move ref_tag calculation func to the block layer
Currently this function is implemented in the scsi layer, but it's 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. Suggested-by: Christoph Hellwig <hch@lst.de> Cc: 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 'drivers/scsi/sd_dif.c')
-rw-r--r--drivers/scsi/sd_dif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c
index 9035380c0dda..d8de43d359ac 100644
--- a/drivers/scsi/sd_dif.c
+++ b/drivers/scsi/sd_dif.c
@@ -124,7 +124,7 @@ void sd_dif_prepare(struct scsi_cmnd *scmd)
if (sdkp->protection_type == T10_PI_TYPE3_PROTECTION)
return;
- phys = scsi_prot_ref_tag(scmd);
+ phys = t10_pi_ref_tag(scmd->request);
__rq_for_each_bio(bio, scmd->request) {
struct bio_integrity_payload *bip = bio_integrity(bio);
@@ -176,7 +176,7 @@ void sd_dif_complete(struct scsi_cmnd *scmd, unsigned int good_bytes)
return;
intervals = good_bytes / scsi_prot_interval(scmd);
- phys = scsi_prot_ref_tag(scmd);
+ phys = t10_pi_ref_tag(scmd->request);
__rq_for_each_bio(bio, scmd->request) {
struct bio_integrity_payload *bip = bio_integrity(bio);