3 ms·
I'm not very familiar with Linux filesystem drivers, but it seems odd that there's separate ext2, presumably ext3, and ext4 drivers when the latter are (100%?)
by userbinator 3y ago
I'm not very familiar with Linux filesystem drivers, but it seems odd that there's separate ext2, presumably ext3, and ext4 drivers when the latter are (100%?) backwards-compatible with the former filesystems.
- derbOac 3y agoAt one time at least, you'd hear arguments for sticking to ext2 (and then ext3) for stability reasons. But I think your question is why they're being deprecated now.
- yjftsjthsd-h 3y agoIIRC ext3 was folded into the ext4 driver. If I was guessing, I would say that they preserved ext2 separately this long because it's a much simpler chunk of code to maintain. (And it's simple, known, stable code, while ext4 continues to undergo active feature development. Not sure how likely that angle is.)
- deleted 3y ago[deleted]
- t0mas88 3y agoI haven't checked, but I expect the ext2 driver to be smaller. Which can be relevant for embedded systems with limited flash space.
- cesarb 3y agoThat happened because the code changes from ext2 to ext3, and later from ext3 to ext4, were very invasive, and filesystems is one place where stability and reliability is very important. So instead of risking introducing data-loss bugs, they forked the code. It was always the plan that the older code would be removed some time later, once the newer code had proven its stability for a while. The on-disk format for these three is the same; the difference is that the later ones understand more of the "incompatible" additions to the on-disk format (IIRC, the main ones being the journal for ext3, and extents for ext4, but there are others). You can convert an "ext2" filesystem into an "ext4" one by just enabling the relevant filesystem format flags on the superblock, and making a few necessary adjustments (for instance, creating a journal when enabling the "has journal" flag).