[dm-devel] dm: Avoid flush_scheduled_work() usage
Mike Snitzer
snitzer at kernel.org
Fri Jul 15 14:25:42 UTC 2022
I'm not applying such a fundamental change to the DM subsystem when
the header for the change leads with: "Note: This patch was made
blindly and completely untested."
I've been busy... when is the deadline for this conversion? I read
commit c4f135d643823a86 but it doesn't say.
I don't think I have the time to make and test such change in time for
5.20 as I'm working to resolve other issues.
Mike
On Fri, Jul 15 2022 at 9:27P -0400,
Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp> wrote:
> 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@I-love.SAKURA.ne.jp
> >> Signed-off-by: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>
> >> ---
> >> 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(-)
> >>
>
More information about the dm-devel
mailing list