[PATCH] nvme: use ns->head->pi_size instead of t10_pi_tuple structure size
Keith Busch
kbusch at kernel.org
Wed Feb 7 15:57:38 PST 2024
On Wed, Feb 07, 2024 at 05:04:17AM +0530, francis.p at samsung.com wrote:
> @@ -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)) {
We could use 'nvme_ns_has_pi(ns->head)' instead. It's essentially the
same as this, so patch applied. Thanks.
More information about the Linux-nvme
mailing list