Re: [PATCH] dm: Avoid flush_scheduled_work() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping?

On 2022/06/13 18:52, Tetsuo Handa wrote:
> Please see commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue()
> using a macro") for background.
> 
> What should we do for this module?
> 
> On 2022/04/20 14:12, Tetsuo Handa wrote:
>> Flushing system-wide workqueues is dangerous and will be forbidden.
>> Remove flush_scheduled_work() from local_init() in dm.c and instead
>> use local workqueue to dm-mpath.c, dm-raid1.c, dm-stripe.c.
>>
>> Link: https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@xxxxxxxxxxxxxxxxxxx
>> Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
>> ---
>> Note: This patch was made blindly and completely untested. Maybe simply
>> removing flush_scheduled_work() from local_init() is sufficient. But I
>> don't know dependency across all files. Therefore, please carefully check
>> which schedule_work() needs to be converted to queue_work().
>>
>> As far as I can see, dm-stripe.c which contains dm_stripe_exit() which is
>> called via _exits[] before local_exit() calls flush_scheduled_work() is
>> the only file which calls schedule_work(). Therefore, I used dm_stripe_wq
>> for dm-stripe.c.
>>
>> Since I don't know dependency, and dm-raid1.c and dm-mpath.c are also calling
>> schedule_work(), I used dm_raid1_wq and dm_mpath_wq. But these changes might be
>> unnecessary because of not calling flush_scheduled_work().
>>
>>  drivers/md/dm-mpath.c  | 17 +++++++++++++----
>>  drivers/md/dm-raid1.c  | 14 +++++++++++---
>>  drivers/md/dm-stripe.c | 12 ++++++++++--
>>  drivers/md/dm.c        |  1 -
>>  4 files changed, 34 insertions(+), 10 deletions(-)
>>

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux