Re: [PATCH] loop: make autoclear operation asynchronous
From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date: 2021-12-08 09:56:41
From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date: 2021-12-08 09:56:41
Can we apply https://lkml.kernel.org/r/d1f760f9-cdb2-f40d-33d8-bfa517c731be@i-love.sakura.ne.jp ? On 2021/12/03 20:01, Tetsuo Handa wrote:
On 2021/12/03 15:50, Christoph Hellwig wrote:quoted
task_work_add sounds nice, but it is currently not exported which might be for a reason (I don't really have any experience with it).I didn't find a reason not to export. But generally task_work_add() users seem to implement a fallback which uses a WQ in case task_work_add() failed (i.e. exit_task_work() was already called from do_exit()) or task_work_add() cannot be used (e.g. the caller is a kernel thread). I don't know if there is possibility that a kernel thread calls blkdev_put(), but implementing the fallback path after all requires WQ. Thus, I think that starting from WQ only and see if something breaks is fine.