On Wed, Oct 18, 2023 at 05:15:36PM +0800, Ming Lei wrote: > > Yes. It has to be a non-exclusive open, though, and how is that going > > to help us with any general use case? If we really want to make the > > media change notifications any useful we'd better just do the work > > straight from the workqueue that polls for it. > > Given ->mark_dead() is added recently, userspace shouldn't depend on > this behavior, so this patch looks fine: While the method is new, disk_check_media_change called __invalidate_device before, which ended up both taking s_umount and thrashing the buffer cache under the fs.