On Fri, 26 Jul 2024 11:05:25 +0800, Haifeng Xu wrote: > When deactivating any type of superblock, it had to wait for the in-flight > wb switches to be completed. wb switches are executed in inode_switch_wbs_work_fn() > which needs to acquire the wb_switch_rwsem and races against sync_inodes_sb(). > If there are too much dirty data in the superblock, the waiting time may increase > significantly. > > For superblocks without cgroup writeback such as tmpfs, they have nothing to > do with the wb swithes, so the flushing can be avoided. > > [...] Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc [1/1] fs: don't flush in-flight wb switches for superblocks without cgroup writeback https://git.kernel.org/vfs/vfs/c/5f307d17dc72