Linus Torvalds Blasts AI-Heavy ext4 Pull Request for Linux 7.4-rc5

Linus Torvalds merged a 41,197-line ext4 pull request for Linux 7.4-rc5 on Tuesday, November 24, 2026, then used his reply to explain why it should never have arrived that late. The pull came from Ted Ts’o, the longtime ext4 maintainer. Most of its lines were new KUnit tests, and Ts’o described most of the bug fixes as AI generated. Linus took the code despite serious reservations and some bad conflicts. He also told Ts’o to “tell your AI companion to get its act together” and keep new development on a separate branch until the merge window.

Linux 7.4 was already a heavy cycle. Linus called rc4 “huge” on November 22.

What Linus Torvalds told Ted Ts’o about AI

Ts’o’s pull request said the bulk of the new lines came from KUnit tests, which make it safer to validate AI-generated patches. Linus started from that sentence. His reply is on the kernel mailing list. The main points, paraphrased:

  • Tests and a huge update like this belong on a separate branch, to be merged during the merge window instead of at rc5.
  • The idea that anything labeled a fix can go into a release candidate is bogus.
  • Neither people nor AI stop adding bugs when they fix things. He wrote that line in capital letters.
  • A bug that stayed hidden for a long time is subtle by definition, so the fix touches something subtle and rare and can be buggy too.
  • A pile of 41,197 insertions can cause problems even when most of it is test code that normal builds skip, or when the changes are labeled fixes.
  • He thought about unpulling the whole thing, settled for a warning, and said he will ignore the next pull that looks like this.

He admitted that this puts the burden on Ts’o, who has to deal with the resulting conflicts while running the tests. In his view that beats dropping tens of thousands of lines into the middle of a release. Neither message in the thread names the AI tool involved.

What was inside the 41,197 lines

The diffstat in Ts’o’s pull request lists 68 files changed, 41,197 insertions and 621 deletions. Its shortlog counts 94 commits from 35 authors. Ts’o wrote 26 of those commits, and 24 of them add or expand KUnit tests. By the diffstat’s numbers, about 38,000 of the roughly 41,800 changed lines sit in 22 test files, which leaves around 3,500 lines of changes everywhere else.

Mostly tests

KUnit is the kernel’s built-in unit testing framework. The tests are C code that lives in the kernel tree, runs at boot or as a loadable module, and reports failures in the kernel log. Ts’o’s commits add test files for a long list of ext4 source files, including block allocation, inline data, fast commit and the resize code. Linus’s objection was about timing, since a test pile that size arrived at rc5.

The fixes

Ts’o’s summary called it a huge number of bug fixes, most of them AI generated. A few examples from the list:

  • Data loss in the EXT4_IOC_MIGRATE path for long contiguous ranges.
  • Out-of-bounds memory accesses in the inline data and extended attribute code when a filesystem is corrupted.
  • Use-after-free bugs in the discard work after a failed mount and in ext4_split_convert_extents().
  • Unchecked blkdev_issue_flush() results, plus failed writeback that is now recorded so fsync() can report it.

The speedups

Three changes were performance work. One spreads the inodes of files in sibling directories across the block groups of a flex group, which reduces lock contention and speeds up parallel file creation. Phoronix credits that patch to Samsung’s Daejun Park. Another moves orphan list tracking off a shared cache line, which improves unlink performance on filesystems without the orphan_file feature. The third speeds up fast commit replay for sparse files.

How Ted Ts’o answered

Time (UTC) Event
Sun, Nov 22 Linux 7.4-rc4 is released
Tue, Nov 24, 16:36 Ts’o sends the ext4 pull request
Tue, Nov 24, 20:36 Linus replies
Wed, Nov 25, 00:21 Ts’o replies
Wed, Nov 25, 03:07 Linus replies again and the pull request tracker bot confirms the merge

Ts’o wrote back in under four hours, starting with an apology. He said the tests had been on a separate branch and that he put them at the end of the pull on purpose, so he could drop them easily if Linus objected. If Linus wanted to unpull, Ts’o offered to send a revised request that stops at a jbd2 documentation commit and to hold the tests for the merge window.

Linus came back under three hours later. He said he does kind of object, but he had already done the merge, and although the test infrastructure changes caused conflicts, he did not think undoing it was worth it. He pushed the merge out and asked Ts’o to check that he had resolved it correctly. The test resolutions looked obviously correct to him, he said, but he had not run any of the tests, so they could be wrong.

Why Linus Torvalds cares so much about when code arrives

Kernel releases follow a fixed cycle. After each release there is a merge window of about two weeks where new features go in. The next six to ten weeks are for fixes, with a new release candidate roughly every week. A normal cycle ends somewhere between rc6 and rc9, according to the kernel’s process documentation. The same page says developers who try to merge new features outside the window tend to get an unfriendly reception.

Ts’o’s pull arrived for rc5, partway through that stretch. Linus’s argument is that a fix label does not make code safe. The weeks between rc1 and the final release exist to catch the fixes that turn out to be wrong.

He has made this argument before. In mid-2025 he refused a bcachefs pull for 6.16-rc3 after a late-cycle journal rewind feature was pitched as a bug fix, as LWN reported. The filesystem was later removed from the mainline kernel, starting with 6.18.

Where Linus Torvalds stands on AI-written patches

Linus is not trying to get AI out of the kernel. In July 2026, he wrote on the mailing list that Linux is not an anti-AI project and called AI a useful tool. He told people who object to fork the project or walk away. He also said the answer to AI-caused pain is making the tools help maintainers instead of burdening them.

He uses the tools himself. In October, it was reported that Linus used Claude Code on an experimental page cache series. His own patch message says the code, the test programs and the first draft of the cover letter came from an LLM coding assistant working under his direction. The New Stack then reported that reviewers found a race in the work, and Linus handed further development to another kernel developer.

Maintainers are feeling the load. The Register reported on November 9 that Linus sees signs the flood of AI-prompted patches may have peaked. Four days later it reported that Lorenzo Stoakes, an Arm engineer and kernel developer, was limiting his reviews to the areas he maintains. He said AI is part of the reason and that it has gone from once a week to daily to about half of what he sees in review.

The written rules put the weight on the person who submits. The kernel’s AI coding assistants page says AI agents must not add Signed-off-by tags. The human submitter has to review all AI-generated code and take full responsibility for it. The tool-generated content guidelines add that maintainers can reject such work outright or ask for extra testing. They also say submitters should expect more scrutiny in proportion to how much was generated.

What r/linux made of it

The r/linux thread ran along a few lines:

  • Several top comments said the issue was timing. Linus has complained about big late pulls for years, long before AI wrote any kernel code.
  • Others noted that most of the line count is unit tests. Someone still has to confirm the tests check what they claim, and AI tools can write tests that pass for the wrong reasons.
  • A few argued he should have rejected the pull outright, because a concrete consequence changes behavior more than a warning does.
  • Many pointed out that Ts’o has worked on the kernel for decades, so a veteran maintainer made the call to send it.
  • Others asked who can review 41,000 lines at all, and said review capacity sets the limit on how much code can go in.

What it means if you run ext4

Nothing in the thread says ext4 became less safe. Linus objected to the timing and size of the pull. The changes go out in rc5 on Sunday, November 29, and Phoronix expects the stable 7.4 release in late December, so the code gets several more weeks of testing first. Most people will not see 7.4 until their distro adopts it.

Conclusion

Linus Torvalds merged the ext4 pull, objected to it in writing and said he will ignore the next one that arrives like this. The tests are now in the tree and the fixes ship in Linux 7.4, due in late December. Linus posts a short note with every release candidate, so the rc5 announcement on November 29 is the next place he might weigh in. If your ext4 drive holds anything you cannot replace, set up a backup this week with our guide to Linux backup software.

Linux Stans

The official Linux Stans account.

162 posts

内容来自 LXer Linux News,版权归原作者所有。

阅读原文 ↗

用 HomepageTab 新标签页关注 RSS,打开浏览器就能看到更新。

安装 HomepageTab