Hacker News new | ask | show | jobs
by just_a_quack 1138 days ago
I think it's because ext2 and ext4 both use block allocation in favor of paging thru bio and uses buffer tricks to write data in a way that reduces fragmentation
1 comments

It has nothing to do with fragmentation, but with wasted space. When ext2 was originally developed in the 1990s, the typical block size employed was 1KB as storage was orders of magnitude smaller, so wasting half a block per file on a floppy disk or small HDD was a significant concern. Today most filesystems use 4KB blocks to match the page size of the most common CPUs as wasting a couple of kilobytes per file is noise.

The journaling layer (jbd) in ext3/ext4 was built on top of buffer_heads as buffer_heads were the way writes got tracked. Rewriting ext4 and jbd2 to use a new data structure to track writes to the journal and disk will be a lot of work. ext4 has a number of issues that make it a less desirable filesystem these days, so it's not clear the work will be worth it any time soon when filesystems like bcachefs, btrfs and xfs do so much better.