[PATCH] nvme: check PI size if metadata size or below
Tokunori Ikegami
ikegami.t at gmail.com
Tue Oct 22 10:51:16 PDT 2024
I see. Thanks for your explanation. To make sure let me confirm again below.
The nvme_ns_has_pi changed does not use PRACT as mentioned but still is
it not okay to change the function only also? (I could understand as
nvme_submit_io() uses PRACT then it does not work correctly as mentioned.)
On 2024/10/23 2:33, Keith Busch wrote:
> 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