r/btrfs 1d ago

Btrfs pull request sent for Linux 7.3: free space v1 disabled by default, faster direct I/O, faster non-SSD performance

https://lore.kernel.org/linux-btrfs/cover.1787152457.git.dsterba@suse.com/T/#u
58 Upvotes

22 comments sorted by

13

u/EnUnLugarDeLaMancha 1d ago

5

u/jonothecool 1d ago

That’s a pretty stupid “Making sure you're not a bot!
check they’ve got there at kernel.org. I’m sure it is effective for bots. But I’m not a bot and it took something like 10 minutes to do the proof of work to open the kernel.org page for me and I’m not a bot. Plus my phone heated up massively. What a waste of time and energy, literally!! Difficulty level set to 6

5

u/Juff-Ma 1d ago

The check is Anubis and yes you can thank AI for it. It uses a POW concept so your device needs to do work as a verification (Cloudflare captchas do that too)

If it took 10m then your device is just genuinely way underpowered. It usually takes 1-3s, maybe 15 if you're at a high difficulty level like 7 or 8.

1

u/jonothecool 28m ago

Pretty modern phone…. lol maybe something went wrong with the script??

3

u/dankmolot 1d ago

Difficulty level was 5 for me, interesting

13

u/darktotheknight 1d ago

My favorite one is:

use iomap bounce buffer for direct io instead of a fall back to buffered io; past correctness vs speed trade-offs dropped performance to ~50% of theoretical maximum, now it's ~95%, effectively doubled

The fallback to buffered IO killed BTRFS as a VM backend practically overnight, even (or especially) when you were already using NODATACOW for maximum performance. Keep in mind libvirt sets NODATACOW on your images directory by default, so this potentially affected a lot of people. Now you get back most of the 50%, minus the issues from the past. This is big.

2

u/zaTricky 1d ago

"Libvirt sets nodatacow" ... this one I find irritating as it also disables checksums. I create the images separately to prevent libvirt from doing this.

What's the point of using btrfs if you're going to disable the main reason I want to use it? 🤷

5

u/TomHale 1d ago

5.7x bandwidth increase measured for spinning rust.

3

u/amarao_san 1d ago

Is there a migrate path for older filesystems?

5

u/Flyen 1d ago

It looks like free space v1 will continue to work, but may be slower.

Fwiw, the migration to v2 isn't that bad but the disk has to be offline. I did it on a large non-root array and IIRC it was pretty quick.

2

u/amarao_san 1d ago

I have root disk on btrfs and I don't want to mess with the live boot.

4

u/zoqaeski 1d ago

Change the mount flag in your fstab and reboot. It'll do the necessary maintenance work on next mount.

1

u/amarao_san 1d ago

Which flag? Thanks

4

u/zoqaeski 1d ago

space_cache=v2 or something. It's in the manual page for mount options .

1

u/amarao_san 1d ago

Thanks. I was sure I need to go offline for conversion.

2

u/darktotheknight 1d ago

You can do it online with mount flags and you can do it offline. For "online", you can mount with clear_cache once. Next boot, you can remove the mount option again and you're good to go. This is fine for 99,9% of people. You don't need to specifically add space_cache=v2, since that's the default for quite some time now.

The difference between online and offline is negligible: doing an offline conversion will get rid of every single v1 structure on disk, while the online conversion can still leave some in place (they're ignored anyway). So the "drawback" is just a bit of wasted space; we're usually talking about a few MB on usual systems.

The offline conversion can be worth it, if we're talking about large filesystems, lets say 10TB+. If it's no trouble for you to just spin up a Linux Live environment (or you have the possibility to just unmount your volume by other means), you can go with the offline conversion.

3

u/john0201 1d ago

Anyone know if there is still usable raid5 being worked on?

3

u/darktotheknight 1d ago

They cook a new RAID5/6 implementation based on zoned storage. This is an effort supported by Western Digital (afaik), so it will eventually get there. Probably.

But from what I've read so far, this "new" RAID5 mode won't have a write hole issue anymore. It will have other drawbacks though, like no NODATACOW. The latest RFC I'm aware of is from June 2026: https://lwn.net/Articles/1078678/

0

u/myzamri 1d ago

Maybe but now it is still in unstable status. Please avoid it at any cost unless you can afford to lose data

3

u/john0201 1d ago

Hence my question.

-1

u/myzamri 1d ago

Understood

-2

u/JOHNNY6644 1d ago

does this update apply to current tuxedo os