Currently, opening and closing InnoDB data files is protected by fil_system.mutex. Based on MDEV-32027, opening files may incur some overhead. Scalability could be better if opening and closing file handles was protected by the something in the fil_space_t of the affected tablespace, rather than by the InnoDB-wide fil_system.mutex.
Initially I thought that we could use fil_space_t::latch, but it seems to be better to introduce a separate srw_mutex for protecting the file handles, because fil_space_t::latch can be held in operations that are allocating or freeing pages inside a tablespace. Such operations could involve page I/O, which in turn could require opening and closing data files.