summaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_cmnd.h
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 /include/scsi/scsi_cmnd.h
parentc454edc21b12dd7d416de6c81555e87aaec9685c (diff)
downloadlinux-ddd0bc756983dc4d19000a4fe021b4c7f9d59aab.tar.bz2
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 'include/scsi/scsi_cmnd.h')
-rw-r--r--include/scsi/scsi_cmnd.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index aaf1e971c6a3..cae229b5395c 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -4,6 +4,7 @@
#include <linux/dma-mapping.h>
#include <linux/blkdev.h>
+#include <linux/t10-pi.h>
#include <linux/list.h>
#include <linux/types.h>
#include <linux/timer.h>
@@ -313,12 +314,6 @@ static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd)
return scmd->device->sector_size;
}
-static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd)
-{
- return blk_rq_pos(scmd->request) >>
- (ilog2(scsi_prot_interval(scmd)) - 9) & 0xffffffff;
-}
-
static inline unsigned scsi_prot_sg_count(struct scsi_cmnd *cmd)
{
return cmd->prot_sdb ? cmd->prot_sdb->table.nents : 0;