On Fri, Feb 19, 2021 at 07:01:41PM -0700, Chris Murphy wrote:
> Hi,
> 
> systemd does remount ro at reboot/shutdown time, and if free space
> tree exists, this is always logged:
> 
> [   27.476941] systemd-shutdown[1]: Unmounting file systems.
> [   27.479756] [1601]: Remounting '/' read-only in with options
> 'seclabel,compress=zstd:1,space_cache=v2,subvolid=258,subvol=/root'.
> [   27.489196] BTRFS info (device vda3): using free space tree
> [   27.492009] BTRFS warning (device vda3): remount supports changing
> free space tree only from ro to rw
> 
> Is there a way to better detect that this isn't an attempt to change
> to v2? If there's no v1 present, it's not a change.
> 
> -- 
> Chris Murphy

I am able to reproduce this with:

mkfs.btrfs -f dev
mount -o space_cache=v2 dev mnt
mount -o remount,ro mnt

At first I assumed I just completely ignored this case, but reading the
code now, it looks like it should have handled it. I assume I messed
up the value of the mount option during a remount when it isn't set by
the mount command.

Apologies for the noise, and I should hopefully have a fix soon.
Boris

Reply via email to