[PATCH] nvme: check PI size if metadata size or below

Keith Busch kbusch at kernel.org
Tue Oct 22 10:33:52 PDT 2024


On Wed, Oct 23, 2024 at 02:08:52AM +0900, Tokunori Ikegami wrote:
> The existing function nvme_configure_metadata() code checks as same as below
> but is this checking case only okay?
> 
> static void nvme_configure_metadata(struct nvme_ctrl *ctrl,
>         struct nvme_ns_head *head, struct nvme_id_ns *id,
>         struct nvme_id_ns_nvm *nvm, struct nvme_ns_info *info)
> {
> 
> ...
> 
>     if (head->pi_size && head->ms >= head->pi_size)
>         head->pi_type = id->dps & NVME_NS_DPS_PI_MASK;

This is merely checking if the metadata is sufficient to do PI. Nothing
to do with usage of PRACT, which is what you're changing.



More information about the Linux-nvme mailing list