On Fri, Aug 11, 2023 at 12:08:15PM +0200, Christoph Hellwig wrote: > The btrfs_fs_devices.opened member mixes an in use counter for the > fs_devices structure that prevents it from being garbage collected with > a flag if the underlying devices were actually opened. This not only > makes the code hard to follow, but also prevents btrfs from switching > to opening the block device only after super block creation. Split it > into an in_use counter and an is_open boolean flag instead. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > --- That looks like it will fix the issue we've seen with the first version. So Acked-by: Christian Brauner <brauner@xxxxxxxxxx> but it'd be excellent to hear from btrfs maintainers.