I used to use BTRFS for my NAS but got hit twice by RAID5/6 data corruption issues, so I had Fable 5.1 run over night to fix it. Theoretically, it says it is fixed and passed all the state machine tests I told it to perform.
I must admit that my code wizard level is relatively low, so I’m not able to adequately analyze all the dark magic in here and was hoping someone here might be able to help me see if this is actually fixed or if it’s a dud.
If there is a better category/spot to put this then please let me know for future reference.
I appreciate the enthusiasm. But is the code correct? Is it crash safe? Interrupt safe? Resistant to timeouts and weird device quirks? You don’t know, because AI is dumb.
Though honestly, if you’re going to go down this rabbit hole, you should be investigating solving it with Raid Stripe Trees. This is a newish BTRFS primitive that, one day, will be the solution to the write hole.
This might come off a bit abrasive, but that’s a pretty unhelpful attitude. Last week I had Claude find and fix a serious bug with llama.cpp that was causing it to output gibberish and squeeze an additional 30% performance out of the ROCm kernel for the AMD Strix Halo and I didn’t even bother submitting it because of that kind of attitude.
Meanwhile I have working code and the rest of the world doesn’t.
What I do know is that this code is better than the broken crap that exists now, and that’s kind of the point.
Also considering BTRFS doesn’t even seem to bother verifying it reconstructs data correctly… idk
What I am going for is not to claim that something is fixed so much as looking for anyone who might be able to point me in the right direction of validating if this is a fix, or who might be able to tell with a bit of a glance if it looks right.
The RAID Stripe Trees I am looking into. I’ll see if I can have it integrate that when I’m done having it fix some other bugs.
I’m using the Ultracode reasoning level, which essentially does this. I further instructed it to do a state machine analysis which it indicated found a further issue with one of the fixes it had built.
I burned through my full week’s allotment of Fable tokens, so now I’m stuck on Opus 5. lol
My next step is going to be to give it SSH access to either a Proxmox instance or a physical system where I can have it simulate and run scenarios with the updated code.
@cowphrase So it looks like RAID Stripe Trees is not implemented for RAID56 for a structural reason.
There is really not a great way to resolve this with RAID56. Basically, implementing this would require variable length stripes like ZFS apparently uses, which would be a massive structural change to BTRFS and would likely be a shit show, or it would require using a full atomic write of a new stripe across all the data and parity.
A full atomic stripe write is also bad as a solution, because that means that if you had data stored in a subset of the drives in the stripe but none on some of them, then you would effectively be unable to use that space without shuffling the data.
It looks like it would end up needing massive rewrites to make it viable on RAID56 and is effectively a non-starter as far as I’m concerned.
Claude did some testing and found that if you shrink the stripes to 4KB instead of 64KB then it would alleviate some of the space loss due to being unable to use most of the stripes for new CoW, but it wouldn’t resolve it fully.
So either you make peace with throwing away a chunk of your storage for a baked in organizational limitation, or you modify the whole system to use variable width stripes and include parity locations.
Yeah, the sorry state of raid56 is why they put a warning on the mkfs command and balance command back in 2021. Its not just the write hole, its broken.
RAID5/6 support has known problems is strongly discouraged to be used besides testing or evaluation
I’m kind of disappointed by the poor response to what I thought was a pretty reasonable way to think about this. It makes me think that people are hyper reactive without really realizing what the bleeding edge AI is capable of.
Yeah it’s not perfect, but I think it really shouldn’t be that hard to vastly improve most codebases with these kinds of bugs as long as there is careful management, testing and review.
Theoretically it should have the write hole fixed now, and it’s churning through another 7 serious bugs it found.
All the while it’s building tests and spinning up detatched agent copies to attack its own fixes and try to break them.
It’s genuinely wild to watch.
I’m sure it’s not perfect but it’s WAY better than even 3-4 months ago, and I very rarely need to guide/correct it.
I think it’s prudent to realize and acknowledge that there will come a point where even the AI’s worst code will vastly out perform any human code for speed, accuracy and overall quality, and I would contend that at least for many things we’re likely getting pretty close. At this point it will literally make a mistake, notice, correct itself, and then make 200 unit tests to verify the code it created works in every conceivable situation.
Thats the crux of the issue, to manage the tool, test and review the results, someone must know the codebase and be a programmer themselves. People like that, which are able to work on a complex filesystem like btrfs are not that common. And i dont think they find appealing to look at code generated by ai by someone else that does not understand it.
Just letting the tool run loose by vibecodemaxxing is still the best way to generate absolute slop.
The ai tool can only be a force multiplier for an expert, not a slave that can work alone.
Probably, but the only way to know when that happens is to be able to verify it. Otherwise it becomes just a cult of the machine, and we just Praise the Omnissiah while chanting in binary for the Machine Spirits.
Or its good enough to deceive you into thinking its doing that, its not the first time Claude makes tests that cannot fail.
Which brings us back to what i said above. To actually tell if the clanker’s work is good or not you need to be a bit of an expert yourself first.
Especially for a filesystem on linux, where the margin of error is not that big. Vibecoding a mobile app is in a lot more forgiving environment.
At least do some tests on a machine using a patched kernel to see if injecting corruption in the block devices, unsafe shutdowns and whatnot actually work as Claude claims.
Yeah, it’s a thing. I’ve experienced this myself in a couple of different formats - I think a lot has to do with people that know a subject already want validation for it and then Ai comes along and can already almost do what they can / do if not do it better. It means that they will have to get better at their skill to compete with the others that will be forced into a “hand crafted” code crowd or learn to use Ai themselves (or god forbid both). I myself am doing both, I am embracing Ai but I’ve realized that Ai is bringing out the neo-luddites in a big way.
What you’re doing is exactly how to learn how Ai operates and how to work “with” it in what is / has quickly become a new field. It’s fascinating in it’s own way let alone taking the earliest steps in learning what is the next wave of world changing technology.
Yeah, it’s not like I’m worshipping at the alter of “AI”, it’s just extremely useful and is better in aggregate than just about any human programmer at this point.
That being said, it has no “intelligence” yet, God help us when they crack that…, no taste, and still isn’t great at picking out mistakes without a lot of churning, testing and feedback.
It just strikes me as profoundly dumb to write it off so dismissively, especially when the problems you’re using it to attack are effectively provable math problems that you can simply hammer over and over until you have validated the logic closes.
Its also bringing out the current generation of people that think they can become “good” at their job by just learning prompt engineering or talking it out with a chatbot.
Just like the previous generation of people that heavily relied on stackexchange overflow or other internet forums to solve programming or tech issue. And now are either boned as those sites are dead or migrated to use ai as a crutch instead and hope to God the bubble does not pop or they are boned again.
Talking it out with a chatbot is literally how a huge portion of people learn complex concepts now. It’s rubber-duck debugging combined with an interactive tutor. Why does that bother anyone, other than the fact that it doesn’t look like the traditional “suffer through archaic man pages and fragmented docs until your eyes bleed” ritual? Gatekeeping the method someone uses to wrap their head around a problem is silly. Tooling evolves, and using an interactive feedback loop to learn isn’t cheating, that’s just efficient.
Bringing up the forum and Stack Overflow era actually proves the opposite point. People turned to those sites because they needed solutions to problems outside their daily wheelhouse. What did they usually get met with? A wall of condescending, elitist gatekeeping from people who’d rather hit you with “marked as duplicate,” downvote your post into the dirt, and lord their niche trivia over you for internet clout than actually help.
Why wouldn’t someone migrate away from that dynamic? An LLM doesn’t have an ego. It sits there on tap 24/7, gladly breaks down obscure concepts at whatever pace you need, and doesn’t insult you for asking a follow-up question.
Reaching for the most effective tool available to bridge a knowledge gap isn’t using a “crutch”, it’s practical problem-solving. If a tool helps someone build, fix, or understand something they couldn’t yesterday without having to endure forum toxicity, that’s a net win for everyone except the people whose egos rely on being the sole gatekeepers of information.