btrfs: warn when remount will not change the free space tree
authorBoris Burkov <boris@bur.io>
Wed, 18 Nov 2020 23:06:24 +0000 (15:06 -0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 9 Dec 2020 18:16:08 +0000 (19:16 +0100)
commit2838d255cb9b85a845efc3bbd3f6fc66ed883d35
treede08745f4a5d99f73ab1dccb5db4d7f925a1ae14
parent04c415596953ec90fdae1ad388fdc8151d5dfdc1
btrfs: warn when remount will not change the free space tree

If the remount is ro->ro, rw->ro, or rw->rw, we will not create or
clear the free space tree. This can be surprising, so print a warning
to dmesg to make the failure more visible. It is also important to
ensure that the space cache options (SPACE_CACHE, FREE_SPACE_TREE) are
consistent, so ensure those are set to properly match the current on
disk state (which won't be changing).

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c