diff options
author | Max Gurtovoy <maxg@mellanox.com> | 2018-07-29 17:15:31 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-30 10:27:01 -0400 |
commit | ddd0bc756983dc4d19000a4fe021b4c7f9d59aab (patch) | |
tree | c60de4ff47106f0c20b1f1beda9df7eedbdc8b86 /drivers/scsi/sd_dif.c | |
parent | c454edc21b12dd7d416de6c81555e87aaec9685c (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.c | 4 |
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) | |||
124 | if (sdkp->protection_type == T10_PI_TYPE3_PROTECTION) | 124 | if (sdkp->protection_type == T10_PI_TYPE3_PROTECTION) |
125 | return; | 125 | return; |
126 | 126 | ||
127 | phys = scsi_prot_ref_tag(scmd); | 127 | phys = t10_pi_ref_tag(scmd->request); |
128 | 128 | ||
129 | __rq_for_each_bio(bio, scmd->request) { | 129 | __rq_for_each_bio(bio, scmd->request) { |
130 | struct bio_integrity_payload *bip = bio_integrity(bio); | 130 | struct bio_integrity_payload *bip = bio_integrity(bio); |
@@ -176,7 +176,7 @@ void sd_dif_complete(struct scsi_cmnd *scmd, unsigned int good_bytes) | |||
176 | return; | 176 | return; |
177 | 177 | ||
178 | intervals = good_bytes / scsi_prot_interval(scmd); | 178 | intervals = good_bytes / scsi_prot_interval(scmd); |
179 | phys = scsi_prot_ref_tag(scmd); | 179 | phys = t10_pi_ref_tag(scmd->request); |
180 | 180 | ||
181 | __rq_for_each_bio(bio, scmd->request) { | 181 | __rq_for_each_bio(bio, scmd->request) { |
182 | struct bio_integrity_payload *bip = bio_integrity(bio); | 182 | struct bio_integrity_payload *bip = bio_integrity(bio); |