[PATCH] nvme: don't flush scan work with non-idle request

Sagi Grimberg sagi at grimberg.me
Wed Aug 17 08:39:43 PDT 2022


>>>> +    /*
>>>> +     * Ensure the namespace inventory is up-to-date before returning if
>>>> +     * this command can change it.
>>>> +     */
>>>> +    if (ret >= 0 && effects & (NVME_CMD_EFFECTS_NIC |
>>>> NVME_CMD_EFFECTS_NCC))
>>>> +        flush_work(&ctrl->scan_work);
>>> Maybe it is better to move nvme_queue_scan together here.
>>
>> I agree, why not move the scan here as well?
> 
> Then I'd need to duplicate this to nvmet_passthru_execute_cmd_work(), and I
> didn't want to do that. :)

Got it,

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>



More information about the Linux-nvme mailing list