btrfs / btrfs-todo

An issues only repo to organize our TODO items
21 stars 2 forks source link

Free space tree issues #5

Closed josefbacik closed 3 years ago

josefbacik commented 4 years ago
cmurf commented 4 years ago

Related: https://lore.kernel.org/linux-btrfs/20200601175252.GC18421@twin.jikos.cz/ cmurf: I was surprised there's no warning when I use space_cache=v2 without first clearing v1. knorrie: t's just sitting there, occupying some space, doing nothing. Sterba: Hm that's not ideal, right?

And also:

mount -o clear_cache apparently just invalidates v1, it doesn't actually ever remove it

mount -o clear_cache,space_cache=v2, the mount command claims it's using v2 in mount, but isn't (feature flag is not set, v2 tree is not created)

knorrie commented 3 years ago

As seen at https://lore.kernel.org/linux-btrfs/87ec1249-b0b8-643b-9031-ebc9aae5f80a@mendix.com/

josefbacik commented 3 years ago

This got resolved with Boris's patches.

unfa commented 2 years ago

I have a filesystem that suddenly only mounts RO. Dmesg shows this:

pią kwi 15 16:23:40 2022] BTRFS info (device sdh): flagging fs with big metadata feature
[pią kwi 15 16:23:40 2022] BTRFS info (device sdh): using free space tree
[pią kwi 15 16:23:40 2022] BTRFS info (device sdh): has skinny extents
[pią kwi 15 16:23:53 2022] BTRFS info (device sdg1): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[pią kwi 15 16:23:53 2022] BTRFS info (device sdg1): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[pią kwi 15 16:24:44 2022] BTRFS info (device sdg1): flagging fs with big metadata feature
[pią kwi 15 16:24:44 2022] BTRFS info (device sdg1): force clearing of disk cache
[pią kwi 15 16:24:44 2022] BTRFS info (device sdg1): force zstd compression, level 3
[pią kwi 15 16:24:44 2022] BTRFS info (device sdg1): using free space tree
[pią kwi 15 16:24:44 2022] BTRFS info (device sdg1): has skinny extents
[pią kwi 15 16:24:54 2022] BTRFS info (device sdg1): clearing free space tree
[pią kwi 15 16:24:54 2022] BTRFS info (device sdg1): clearing compat-ro feature flag for FREE_SPACE_TREE (0x1)
[pią kwi 15 16:24:54 2022] BTRFS info (device sdg1): clearing compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[pią kwi 15 16:24:56 2022] BTRFS info (device sdg1): creating free space tree
[pią kwi 15 16:25:39 2022] BTRFS info (device sdg1): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[pią kwi 15 16:25:39 2022] BTRFS info (device sdg1): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)

How can I mount this FS in read-write?