nvme: use ns->head->pi_size instead of t10_pi_tuple structure size
Currently kernel supports 8 byte and 16 byte protection information. So, use ns->head->pi_size instead of sizeof(struct t10_pi_tuple). Signed-off-by: Francis Pravin <francis.p@samsung.com> Signed-off-by: Sathyavathi M <sathya.m@samsung.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
e8c263ed6d
commit
4054705215
@ -228,7 +228,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
|
||||
length = (io.nblocks + 1) << ns->head->lba_shift;
|
||||
|
||||
if ((io.control & NVME_RW_PRINFO_PRACT) &&
|
||||
ns->head->ms == sizeof(struct t10_pi_tuple)) {
|
||||
(ns->head->ms == ns->head->pi_size)) {
|
||||
/*
|
||||
* Protection information is stripped/inserted by the
|
||||
* controller.
|
||||
|
Loading…
x
Reference in New Issue
Block a user