diff options
author | Max Gurtovoy <maxg@mellanox.com> | 2018-07-30 00:15:31 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-30 08:27:01 -0600 |
commit | ddd0bc756983dc4d19000a4fe021b4c7f9d59aab (patch) | |
tree | c60de4ff47106f0c20b1f1beda9df7eedbdc8b86 /drivers/nvme | |
parent | c454edc21b12dd7d416de6c81555e87aaec9685c (diff) | |
download | linux-ddd0bc756983dc4d19000a4fe021b4c7f9d59aab.tar.gz linux-ddd0bc756983dc4d19000a4fe021b4c7f9d59aab.tar.bz2 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 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index e77e6418a21c..16c8b86fe95d 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -611,8 +611,7 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns, case NVME_NS_DPS_PI_TYPE2: control |= NVME_RW_PRINFO_PRCHK_GUARD | NVME_RW_PRINFO_PRCHK_REF; - cmnd->rw.reftag = cpu_to_le32( - nvme_block_nr(ns, blk_rq_pos(req))); + cmnd->rw.reftag = cpu_to_le32(t10_pi_ref_tag(req)); break; } } |