From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Nilay Shroff <nilay@linux.ibm.com>,
syzbot+9dd7dbb1a4b915dee638@syzkaller.appspotmail.com
Subject: Re: [PATCH] loop: replace freezing queue with quiesce when changing loop specific setting
Date: Fri, 4 Apr 2025 20:06:05 +0800 [thread overview]
Message-ID: <Z-_LLTtusK8g0rlM@fedora> (raw)
In-Reply-To: <20250404091149.GC12163@lst.de>
On Fri, Apr 04, 2025 at 11:11:49AM +0200, Christoph Hellwig wrote:
> On Thu, Apr 03, 2025 at 06:54:14PM +0800, Ming Lei wrote:
> > freeze queue should be used for changing block layer generic setting, such
> > as logical block size, PI, ..., and it is enough to quiesce queue for
> > changing loop specific setting.
>
> Why? A queue should generally be frozen for any setting affecting the
> I/O path. Nothing about generic or internal.
For any driver specific setting, quiesce is enough, because these settings
are only visible in driver IO code path, quiesce does provide the
required protection exactly.
>
> This also misses an explanation of what setting this protects and why
> you think this is safe and the sound fix.
1) it is typical queue quiesce use case
2) loop specific setting is only visible in loop queue_rq() & workfn, and
quiesce does provide the sync for queue_rq()
3) for driver, quiesce is always preferred over freeze, and freeze is
easily mis-used by driver, you know we have bad driver uses for freeze.
However, for loop, quiesce only isn't enough, we need to flush the
workqueue for avoiding workfn to use the changed setting too, will do
it in V2.
Thanks,
Ming
next prev parent reply other threads:[~2025-04-04 12:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 10:54 [PATCH] loop: replace freezing queue with quiesce when changing loop specific setting Ming Lei
2025-04-03 20:04 ` Zhu Yanjun
2025-04-04 9:11 ` Christoph Hellwig
2025-04-04 12:06 ` Ming Lei [this message]
2025-04-07 6:48 ` Christoph Hellwig
2025-04-07 14:54 ` Ming Lei
2025-04-08 5:23 ` Christoph Hellwig
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=Z-_LLTtusK8g0rlM@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=nilay@linux.ibm.com \
--cc=syzbot+9dd7dbb1a4b915dee638@syzkaller.appspotmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox