From: Mike Snitzer <snitzer@kernel.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, mpatocka@redhat.com
Cc: dm-devel@redhat.com, Alasdair Kergon <agk@redhat.com>
Subject: Re: [dm-devel] Planning to WARN_ON() when flush_scheduled_work() is used.
Date: Tue, 14 Feb 2023 13:34:26 -0500 [thread overview]
Message-ID: <Y+vUMmatAkt6yS5u@redhat.com> (raw)
In-Reply-To: <53e65050-5be2-0037-b01f-60db5aea24b6@I-love.SAKURA.ne.jp>
On Sat, Feb 11 2023 at 1:19P -0500,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
> Hello.
>
> Like commit c4f135d64382 ("workqueue: Wrap flush_workqueue() using a macro")
> says, flush_scheduled_work() is dangerous and will be forbidden. But I haven't
> heard from you after https://lkml.kernel.org/r/YtF45oMcHMKXjIyy@redhat.com .
>
> https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp
> https://lkml.kernel.org/r/e170edc2-e5b9-4c8b-4ed3-7e2d7a2850dc@I-love.SAKURA.ne.jp
>
> Please do clarify which work items does this flush_scheduled_work() need to wait.
>
> Regards.
>
WARN_ON() seems excessive, why not WARN_ON_ONCE()?
But that aside, sorry for not looking closely and responding with
findings sooner.
BUT, I did just have a quick look at drivers/md/dm.c and its use of
flush_schduled_work(): a quick 'git blame drivers/md/dm.c' told me it
was only introduced for the benefit of DM's deferred device removal
feature (commit 2c140a246dc0b "dm: allow remove to be deferred").
Given that, I've staged these 2 commits for 6.3 inclusion:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.3&id=68fb709113077f1f367d8a55deb01d2d6bf23b0f
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.3&id=cd4afc85b39c1b9dd63715c591829f67b07c86a8
Thanks,
Mike
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
prev parent reply other threads:[~2023-02-14 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 6:19 [dm-devel] [dm] Planning to WARN_ON() when flush_scheduled_work() is used Tetsuo Handa
2023-02-14 18:34 ` Mike Snitzer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+vUMmatAkt6yS5u@redhat.com \
--to=snitzer@kernel.org \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=mpatocka@redhat.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.