On Thu, Aug 03, 2023 at 12:43:41PM -0300, Guilherme G. Piccoli wrote: > Devices with the single-dev feature enabled in their superblock are > allowed to be mounted regardless of their fsid being already present > in the system - the goal of such feature is to have the device in a > single mode with no advanced features, like RAID; it is a compat_ro > feature present since kernel v6.5. > > The thing is that such feature comes in the form of a superblock flag, > so devices that doesn't have it set, can't use the feature of course. > The Steam Deck console aims to have block-based updates in its > RO rootfs, and given its A/B partition nature, both block devices are > required to be the same for their hash to match, so it's not possible > to compare two images if one has this feature set in the superblock, > while the other has not. So if we end-up having two old images, we > couldn't make use of the single-dev feature to mount both at same time, > or if we set the flag in one of them to enable the feature, we break > the block-based hash comparison. > > We propose here a module parameter approach to allow forcing any given > path (to a device holding a btrfs filesystem) behaving as a single-dev > device. That would useful for cases like the Steam Deck one, or for > debug purposes. If the filesystem already has the compat_ro flag set > in its superblock, the parameter is no-op. > Now this one I'm not a fan of. For old file systems you can simply btrfstune them to have your new flag. Is there a reason why that wouldn't be an option? If it is indeed required, which is a huge if, I'd rather this be accomplished a mount option. I have a strong dislike for new mount options, but I think that's a cleaner way to accomplish this than a module option. Thanks, Josef