On Fri, Nov 03, 2023 at 03:19:40PM +0100, Christoph Hellwig wrote: > On Fri, Nov 03, 2023 at 02:52:27PM +0100, Christian Brauner wrote: > > Fix this by counting the number of block devices that requested the > > filesystem to be frozen in @bdev_count in struct sb_writers and only > > unfreeze once the @bdev_count hits zero. Survives fstests and blktests > > and makes the reproducer succeed. > > Is there a good reason to not just refcount the freezes in general? If we start counting freezes in general we break userspace as freeze_super() is called from ioctl_fsfreeze() and that expects to return EBUSY on an already frozen filesystem. xfs scrub might be another user that might break if we change that.