[PATCH 1/3] driver core: Support asynchronous driver shutdown

Sagi Grimberg sagi at grimberg.me
Tue Dec 19 05:49:18 PST 2023



On 12/19/23 08:21, Christoph Hellwig wrote:
> On Mon, Dec 18, 2023 at 10:19:43PM -0800, Jeremy Allison wrote:
>>> Is there any reason to have a separate shutdown_pre method?
>>> Especially with all the method wrapping in the driver core, yet
>>> another method just keeps confusing everyone.
>>
>> Currently in the patch the existence of a shutdown_pre() method
>> for a device causes it to be added to the async_shutdown_list
>> which is walked to reap the completion status after all the
>> calls to shutdown_pre().
>>
>> I could change this so that the existing shutdown() method
>> is always called, and the device is only added to the async_shutdown_list
>> if a shutdown_post() (or as requested below, shutdown_wait())
>> method is defined for the device.
> 
> Yes, that's what I mean.

I think its usually better to separate sync vs async interfaces. However
I assume that the suggested interface exists elsewhere in the kernel, so
its not a big deal.



More information about the Linux-nvme mailing list