RETRO

Software and AI · linux · open source

A forty-one-thousand-line fix

Do you know the most dangerous sentence that can come out of a filesystem maintainer's mouth in the Linux kernel? "Just a few bug fixes." I'll tell you why in a minute.

First, a confession: I haven't tried any of what this piece describes on my own machine. It's based on messages sent to the kernel mailing list, the merged commits, the kernel's own documentation and the news stories that covered the thread. Automated access to the actual thread on lore.kernel.org is closed, so I'm giving you the quotes in the form that several independent sources report identically.

What happened?

On Tuesday, 24 November 2026, Theodore Ts'o, maintainer of the ext4 filesystem, sent Linus Torvalds the ext4 pull request for Linux 7.4-rc5. (A pull request is the "please take what's in my branch and add it to the main tree" request.) A quick reminder of the calendar: 7.4-rc1 came out on 1 November. So the merge window (the two weeks when new features get accepted) had long since closed, and only bug fixes were being taken. rc5 is also a pretty late point in the release cycle. At this stage what you expect is small, careful, easy-to-read patches.

The pull touched 68 files. Now look at the lines: roughly 41,197 additions and 621 deletions. It's FOSS counts 41,204 lines in the merge commit. On the number of commits, the sources don't agree. It's FOSS says 94. A write-up on DEV Community counts 66 commits from 27 authors and says 26 of them are Ts'o's. According to the same write-up, 22-23 of the files are KUnit tests, and about 92 percent of the changed lines are those tests.

Ts'o didn't hide any of this. He said it outright in his message. As reported, most of the fixes were generated with AI, and most of the new lines are KUnit tests written to make verifying the AI-generated patches safer. So the man sending the pull knew exactly what was what, and he wrote it down. Make a note of that, it'll come in handy later.

The bugs fixed are real bugs

Let's be fair here. According to the reports, the list of fixed bugs reads like it was compiled from a filesystem user's nightmares:

  • fsync'd data getting lost during fast-commit replay or after a journal flush. (fsync means "write this data to disk and make sure you've written it." Promising that and not delivering is the gravest crime a filesystem can commit.)
  • Data loss while migrating ext3 inodes with EXT4_IOC_MIGRATE.
  • Stale data left lying around after a failed zeroout.
  • Use-after-free bugs on a failed mount.
  • A deadlock caused by an inverted lock order.
  • Out-of-bounds memory accesses on corrupted filesystems.
  • A readdir problem with large directories on 32-bit kernels.

Every one of these is the kind of bug that could one day eat someone's disk. So this isn't a story you can brush off with "AI rained down garbage patches." Quite the opposite: the bugs it found are real, and they need fixing.

There was other stuff in the pull too. According to It's FOSS, the orphan list's fields were split off from a shared cache line, and holes in sparse files are now skipped during fast commit replay. The cutest one is the commit from Samsung's Daejun Park (06954d44c6d0): when flex_bg was in use, files created in sibling directories landed in the same block group with consecutive inode numbers. And processes running in parallel were at each other's throats over the locks on the inode table buffers. The measurement in the commit message has 16 tasks on NVMe, each creating 60,000 empty files. The number of blocks read from the inode table drops from roughly 50,000 to somewhere in the 260-530 range. Speed goes from about 290 thousand files per second to 780 thousand. Those numbers aren't mine, they're the commit message's. Still, you don't often see a result this clean from a filesystem patch.

Over to Torvalds

Torvalds took the pull the same day, but, as reported, "with serious reservations." On top of that, there were nasty merge conflicts. The sentence he shouted in capitals shows up word for word in every story: "STOP THINKING THAT YOU - OR AI - NEVER ADD BUGS WHEN YOU FIX SOMETHING". In other words: quit assuming that neither you nor the AI adds bugs when fixing something.

He asked Ts'o to tell his "AI companion" to get its act together. He said new development and test files should sit in a separate branch, so they could be taken during the merge window. He added that from now on he'd ignore any pull that looked like this. He wrote that he hadn't run the tests himself and asked Ts'o to check how he'd resolved the conflicts. He'd also thought about reverting the merge, but decided it wasn't worth it.

(One source writes that it ended with an even harsher closing line. But only that source reports it, and since I couldn't see it in the actual thread, I'm not bringing it over here.)

Ts'o apologised on 25 November. He explained that the tests were already in a separate branch, placed at the very end of the pull so they could be dropped if wanted. He offered to resend a pull that stopped before the tests and leave the tests for the next merge window. Torvalds replied once more, and pr-tracker-bot confirmed the merge had landed in the main tree.

And the "AI doesn't add bugs" part?

This is the most instructive bit. On 26 November, Ts'o sent a new pull titled "ext4 post-7.4-rc5 merge fixups": 7 files, 27 additions, 1 deletion. It fixed KUnit tests that broke during the merge with the main tree (ext4_xattr_test, and ext4_inode_test with CONFIG_USER_NS enabled), plus a bug in the generic/311 test that shows up when fast_commit and inline_data are used together. Ts'o himself wrote that the pre-pull testing had missed these bugs.

So the thing Torvalds said in capitals got proven in the same tree within two days. The fixes can be correct, the tests can be well-meaning. But shove forty thousand lines into a late rc and something, somewhere, WILL break. The AI didn't do that. The line count did.

Is this an AI ban?

Not at all! Some of the coverage ran headlines that way, but there's no ban. The kernel documentation already has a page on AI coding assistants (on docs.kernel.org, under process/coding-assistants). And in his 7.x release announcements Torvalds has mentioned the flood of AI-found fixes coming in: in May 2026 with 7.1-rc4, and on 8 November with 7.4-rc2. The 7.4 merge window was unusually crowded too; It's FOSS says around 20,000 commits.

Torvalds's objection isn't really to the tool, it's to the timing and the packaging. An rc's job is to take small, readable fixes that can be reverted one by one if need be. Forty thousand lines of test infrastructure, however good, is new development, and it belongs in the merge window. Ts'o putting the tests at the end of the pull with an "if you want, drop them" isn't enough in Torvalds's eyes either. Because he's the one doing the merge, resolving the conflicts and carrying the result. Saying "it's at the end, you can drop it" means dumping part of the job on the person receiving it.

If you ask me

The lesson here, as I see it: AI really is useful for finding bugs (losing fsync'd data is no small bug!), but how what it finds gets into the main tree is still entirely a human's job. Whoever generates the patch, splitting it up, putting it in order and sending it at the right time is the maintainer's responsibility. Ts'o wrote honestly in his pull what came from AI, and he deserves credit for that. But an honestly labelled load is still a load.

One more thing: don't get so hung up on Torvalds's bluntness that you miss the actual content. The heart of the thread isn't the swearing, it's the sentence "fixing things adds bugs too." If you're having an AI assistant do bulk fixes on your own projects, get the output in reviewable chunks, not as one giant commit. And before you merge, for God's sake, take a BACKUP.

7.4-rc5 itself was expected out on Sunday, 29 November. As I write these lines I couldn't find an announcement that it's out, so I can't tell you anything for certain on that. As for which way ext4's tests go in the next merge window, we'll talk about that next issue.

See you then, bye for now!..

Sources

Contents · Issue 03 · November 2026