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