[PATCH 1/3] driver core: Support asynchronous driver shutdown
Sagi Grimberg
sagi at grimberg.me
Tue Dec 19 06:12:37 PST 2023
On 12/19/23 15:56, Christoph Hellwig wrote:
> On Tue, Dec 19, 2023 at 03:49:18PM +0200, Sagi Grimberg wrote:
>>>> 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.
>
> I don't think we have async shutdown anywhere else.
I meant the case where an interface is either sync where it needs to
complete inside the callback, or it can be async because it is also
paired with an optional _wait|_post|_end handler.
> It's also not really an async interface is the classic sense, but more a
> fire now and then wait for completion later interface, i.e. no notication
> on completion but pure polling.
It could have been waiting on a notify/completion for that matter.
I find the above a bit ambiguous, but maybe its just me, so I don't
care much about it. Your suggestion is fine too.
More information about the Linux-nvme
mailing list