[PATCH 4/4] nvme: Add two-pass shutdown support
Jeremy Allison
jra at samba.org
Tue Jan 2 10:03:27 PST 2024
On Mon, Jan 01, 2024 at 11:21:14AM +0200, Sagi Grimberg wrote:
>
>
>On 12/27/23 02:53, Jeremy Allison wrote:
>>On Mon, Dec 25, 2023 at 11:58:04AM +0200, Sagi Grimberg wrote:
>>>On 12/21/23 19:22, Jeremy Allison wrote:
>>>> EXPORT_SYMBOL_GPL(nvme_disable_ctrl);
>>>>+int nvme_wait_for_shutdown_cmpl(struct nvme_ctrl *ctrl)
>>>>+{
>>>>+ ctrl->ctrl_config &= ~NVME_CC_SHN_MASK;
>>>>+ ctrl->ctrl_config |= NVME_CC_SHN_NORMAL;
>>>
>>>Why is ctrl_config being set again?
>>
>>Good catch. There's no need for that. I'll fix
>>in the next iteration, thanks !
>>
>>>>+EXPORT_SYMBOL_GPL(nvme_wait_for_shutdown_cmpl);
>>>
>>>Why export the symbol?
>>
>>nvme_wait_for_shutdown_cmpl() calls nvme_wait_ready(),
>>which is a static function defined in drivers/nvme/host/core.c.
>>
>>The only way to inline the functionality of nvme_wait_for_shutdown_cmpl()
>>into nvme_shutdown_wait() is to export nvme_wait_ready() instead.
>>
>>If you're OK with that I can remove the intermediate
>>function nvme_wait_for_shutdown_cmpl() (and indeed as
>>you've pointed out there's no need to set ctrl->ctrl_config
>>again).
>
>I think it is small enough to make it static inline in nvme.h
Sorry, just looking for some clarification here. Are
you talking about inlining nvme_wait_ready() ? There
are indeed larger functions already inlined in nvme.h.
More information about the Linux-nvme
mailing list