summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMax Gurtovoy2018-07-29 23:15:31 +0200
committerJens Axboe2018-07-30 16:27:01 +0200
commitddd0bc756983dc4d19000a4fe021b4c7f9d59aab (patch)
treec60de4ff47106f0c20b1f1beda9df7eedbdc8b86 /include/scsi
parentblock: don't account for split bio's size in cgroup stats (diff)
downloadkernel-qcow2-linux-ddd0bc756983dc4d19000a4fe021b4c7f9d59aab.tar.gz
kernel-qcow2-linux-ddd0bc756983dc4d19000a4fe021b4c7f9d59aab.tar.xz
kernel-qcow2-linux-ddd0bc756983dc4d19000a4fe021b4c7f9d59aab.zip
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')
-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;