Developers

Linus Torvalds Rejects Late-Stage Pull Request From ext4 Maintainer Over Code Volume

Theodore Ts'o submitted a 94-commit pull request for Linux 7.4-rc5 that added over 41,000 lines of code, mostly AI-generated tests and bug fixes, prompting Torvalds to object to the timing and size of the submission.

4 min read
Linus Torvalds is Angry Again, This Time With ext4 Dev

Theodore Ts'o, the maintainer of the ext4 filesystem, submitted a pull request containing 94 commits to Linus Torvalds for Linux 7.4-rc5. The resulting merge commit introduced 41,204 lines of code spread across 68 files. According to Ts'o, the majority of the newly added code consists of KUnit tests designed to validate patches generated by artificial intelligence, and he noted that most of the bug fixes included in the pull request were also produced by AI.

The source of Torvalds's objection

The ext4 filesystem evolved from ext3 and was engineered to provide reliability and support for large-scale storage systems, including filesystems exceeding 16TB in capacity. KUnit serves as the kernel's unit testing framework, enabling tests written in C to run against kernel code during boot or as a loadable module.

Within Ts'o's pull request, tests accounted for 22 of the 68 modified files. The remaining changes consisted of bug fixes and three minor performance optimizations. One performance improvement distributes file inodes across sibling directories within a flex group's block groups, accelerating parallel file creation. A second change relocates orphan list fields from a shared cache line, while a third optimization bypasses holes when replaying fast commits for sparse files.

The bug fixes addressed several critical issues, including data loss scenarios such as fsync'ed data disappearing following a journal flush and information lost during ext3 inode migration. Additional fixes tackled stale data resulting from failed zeroout operations, use-after-free vulnerabilities, out-of-bounds memory access on corrupted filesystems, and a readdir malfunction affecting large directories on 32-bit kernels.

Timing concerns in the kernel release cycle

Kernel development follows a structured cycle in which new functionality enters during a merge window lasting approximately two weeks. The weekly release candidates that follow, designated as "rc" builds, are designated for bug fixes only, with most cycles concluding between rc6 and rc9.

Torvalds contended that a submission of this magnitude belongs during the merge window rather than in an rc phase, and that labeling code as a fix does not automatically qualify it for inclusion at this stage. He argued that introducing more than 41,000 additional lines can introduce new issues regardless of whether they are tests or fixes for existing bugs. He further noted that fixes addressing long-standing, complex bugs can themselves introduce new problems, whether authored by humans or artificial intelligence.

Despite considering rejecting the pull request entirely, Torvalds ultimately accepted it but issued a stern warning to Ts'o:

Get your shit together and stop this kind ofidiocy.And tell your AI companion to get its act together, and do any new development and test-cases ON A SEPARATE DAMN BRANCH, so that it can be merged during the MERGE WINDOW. What's so hard to understand about this?

Linus Torvalds

Resolution and response

Ts'o responded by clarifying that the tests had already been isolated on their own branch and positioned at the end of the pull request to allow for straightforward removal if necessary. He volunteered to prepare an alternative pull request excluding the tests and defer them until the next merge window commenced.

Torvalds replied that he retained some reservations but decided to retain the merge. The conflicts introduced by the test modifications were insufficient to justify reverting the change.

Torvalds's broader stance on AI in the kernel

In May, Torvalds had previously expressed frustration regarding an inflated rc cycle containing unnecessary pull requests, many assisted by AI, and pledged to enforce stricter standards. However, he has also clarified that Linux does not belong to the category of projects opposed to artificial intelligence.

According to Torvalds's assessment, the 7.4 merge window received nearly 20,000 commits compared to the customary approximately 15,000. He indicated a preference for receiving AI-generated fixes during the merge window rather than late in the rc phase, and he expressed hope that such contributions would eventually become routine and unremarkable.

Source: It's FOSS News · Reporting supplemented by The Silicon Ledger staff.