News: 0001544470

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Bcachefs Patches Aim For Faster Snapshot Deletion But With Another On-Disk Format Update

([Linux Storage] 6 Hours Ago Bcachefs Snapshot Deletion)


In addition to [1]Bcachefs working on better self-healing / automatic repair capabilities , this modern copy-on-write file-system is also working on faster snapshot deletion performance. A patch series was posted this week to speed-up the deletion of snapshots though it comes with another bump to the on-disk format of the file-system.

Bcachefs lead developer Kent Overstreet posted the patch series on Friday for improving the snapshot deletion code. He explained with [2]the patch series :

"Snapshot deletion performance has been reported to be an issue, so this patch series should address that.

The important optimization relies on the fact that if an extent/dirent/xattr exists, a version of that inode must exist in that specific snapshot. We can make use of that to avoid a lot of scanning.

Previously only fsck relied on this, so it would spit out a warning and correct the issue in its in memory data structures if this occurred. Now, it's turned into a proper fsck_err() with on-disk repair if detected.

We also want some additional safety with this: if snapshot deletion ever screws up and doesn't delete all the keys it was supposed to, we want to be able to automatically repair.

So there's a new on disk format version with an incompatible (i.e. must be expliticly enabled) feature, where we never delete snapshot keys - we just mark them as deleted.

This allows fsck to differentiate between "key for deleted snapshot, I know how to repair this" vs. "key for missing snapshot, we're not sure what happened and someone should probably take a look".

And snapshot deletion status is now present in sysfs, currently with btree and position in that btree. We do have per-snapshot-id accounting, so it might be possible to turn that into a proper progress indicator later."

So faster deleting of Bcachefs snapshots but does require an incompatible on-disk format that must be enabled. Bcachefs has been working to [3]settle down changes around its on-disk format and aimed for it to be "soft frozen" in Linux 6.15 ahead of eventually removing the experimental flag on the file-system.

These snapshot deletion patches are now under review for Bcachefs, we'll see if they are ready to go with the upcoming v6.16 merge window.



[1] https://www.phoronix.com/news/Bcachefs-Fixes-SH-Auto-Repair

[2] https://lore.kernel.org/lkml/20250502200002.1309862-1-kent.overstreet@linux.dev/

[3] https://www.phoronix.com/news/Bcachefs-Linux-6.15



Pranos

varikonniemi

mdedetrich

Hans Bull

pWe00Iri3e7Z9lHOX2Qx

mrg666

rmfx

curfew

The algorithm for finding the longest path in a graph is NP-complete.
For you systems people, that means it's *real slow*.
-- Bart Miller