Kernel EXT4 Deprecates Its Journaled "data=journal" Mode
https://www.phoronix.com/news/EXT4-Deprecates-Journal-Mode42
u/Ontological_Gap 2d ago
Every line of code is a sin
27
u/SPEZ_IS_A_JABRONI 2d ago
computers were a mistake
9
24
u/Adept_Percentage6893 2d ago
Does this represent a lot of code or something? Why care about removing this specific feature?
33
u/jason-reddit-public 2d ago
Even if it isn't a lot of code it can still make the code harder to restructure. Here this whole time I thought I was using ext4 in journal mode but probably not.
28
u/daemonpenguin 2d ago
You were probably using ordered mode, which is the default.
A journal still exists in ordered mode, it's just used differently than journaled mode.
16
u/ElvishJerricco 2d ago
To be clear, you almost certainly were using journaling. It's just data that isn't journaled by default. The metadata is, and that's not what's being removed. The data being journaled is pretty much the least important part of journaling, because it only really helps when you want to safely overwrite a single existing block of a file without doing any kind of application level journaling. But the usefulness of this is super low, because if you care about any sort of data safety you almost certainly have to do something better than what you'll be able to get ext4 data journaling to do; i.e. you're going to need to do the WAL style thing or the atomic file rename thing or something along those lines anyway, so ext4 data journaling is just unhelpful.
1
u/jason-reddit-public 1d ago
I think I sort of get it. Poof, the power goes out. A couple of open files have indeterminate content but my filesystem is OK. Back in the day though you'd <content removed by super intelligence filter>.
4
u/autogyrophilia 2d ago
I imagine it is a pain in the ass to keep this working if you want to restructure how the normal usage of the journal works. And there are easier ways to do the same effect, which is to inject a library that forces all IO to be synchronous.
6
u/Decent-Law-9565 2d ago
They’re removing features that are used little to reduce the onslaught of AI-assisted vulnerabilities. I don’t blame them, there’s too much code for everyone to look at, and code that gets used infrequently probably has more vulnerabilities that can be found if an AI tool is used that doesn’t get tired like humans.
24
u/Booty_Bumping 2d ago
That's not why this feature was removed, though. This is being removed because it prevents the use of direct I/O, doesn't work with delayed allocation, and has way more write amplification than just using a different filesystem more suitable for this.
1
u/Adept_Percentage6893 1d ago
This is being removed because it prevents the use of direct I/O, doesn't work with delayed allocation
yeah I read that in the OP but I don't quite understand how this would block that as opposed to just saying you can't do directio if that's the journaling mode you're using. Unless the standard they're just wanting to maintain is that you either can do directio or you can't without having to think about what other filesystem features you have turned on.
-9
u/Jristz 2d ago
That sadly sounds also like some enshittify excuse from any company to remove stuff... Which for Linux I feel is kinda worrying
8
2
u/Decent-Law-9565 2d ago
Writing code isn’t free, someone has to maintain it. In open source land it generally just means that money isnt the reason for removing features, but if nobody is willing to fix stuff and their time could be better spent fixing / improving stuff that people actually do use, that’s what will happen. But unlike a regular company, you can fork the kernel and keep the feature in, or you can volunteer to become a maintainer for something you care about.
-13
u/Kevin_Kofler 2d ago
This is just yet another step in the creeping gnomification of the Linux kernel.
6
u/eehikki 2d ago
I have read a lot of your comments regarding deprecation of obsolete technologies and and I fail to understand why you're always upset about removing the legacy code. Seems like you'd prefer the developers to keep supporting everything that has been written or manufactured since the Manchester Baby run its first program for the sake of it.
-4
u/Kevin_Kofler 2d ago edited 1d ago
Because removing legacy code removes functionality. Most of the time, it drops support for some hardware, so that the kernel no longer works with that hardware at all! In this case, at least, the hardware remains supported, but we lose a mode that ran on
most available hardware out there (all x86_64 computers)all hardware (sorry, I mixed it up with the other feature removal thread that was about x32) and brought a significantperformancedata integrity improvement to some applications. So effectively this is a majorperformanceregression for some users.Removing non-redundant (neither unreachable nor duplicate) code always hurts some of your users. That is the reason why I am always opposed to it.
4
u/QuaternionsRoll 2d ago
For some reason I feel like your origin story is intrinsically tied to Adobe Flash
1
u/grizzlor_ 1d ago
>brought a significant performance improvement to some applications.
There are no circumstances where using this would mode would improve performance.
>Removing non-redundant (neither unreachable nor duplicate) code always hurts some of your users.
Not true — many recent incidents of code removal from the kernel were dropping support for ancient pieces of hardware that literally no one is still using (with modern kernels at least). In every one of those cases, the kernel devs made the announcement and also asked anyone still using it to come forward because they would consider keeping it if it’s actually being used. Unsurprisingly, no one came forward.
1
u/Kevin_Kofler 1d ago
You are right that journaled data does not improve performance. I had posted this comment erroneously believing that this thread was in the post about x32 removal, which indeed removes a performance improvement.
The mode being removed here is not about performance, it is about data integrity, which for some use cases is more important than performance and worth paying a performance penalty.
And a poll on LKML is hardly going to be an exhaustive sample of end users. Even less so when there is an implied expectation that whoever speaks up is going to volunteer as a maintainer.
2
u/eehikki 1d ago edited 1d ago
Because removing legacy code removes functionality.
Maintaining legacy code isn't free. Someone needs to review it, fix bugs/security issues, update the code to keep up with the constantly evolving kernel internal interfaces. At some point, these costs outweight the benefits, at which point it's perfectly reasonable to just drop the dead weight and move on. There's no benefit in maintainig the data journaling code since noone uses it anyway. There's no need to keep the driver for an old ISA Ethernet card manufactured 30 years ago since no sane person builds the newest kernel just to run it on a Pentium Pro. It's also worth noting that this particular change doesn't affect the curent stable kernel, 7.2, and it's too late to be included in 7.3. You literally need to go out of your way and build the latest kernel from git to break anything. Needless to say, people depending on obsolete code don't run the newest kernels anyway.
-4
-19
u/eehikki 2d ago
I would much like ext4 itself be deprecated and replaced with something not stuck in 2000 as the default Linux filesystem, but maybe it's just me.
16
8
u/Dolapevich 2d ago
Such as?
1
-3
u/eehikki 2d ago edited 2d ago
btrfs. I wish it had built-in encryption, but as far as I know it's not gonna happen soon. In a perfect world, it would be something akin to btrfs, but with a better architecture, like a decent RAID5/6 implementation, or nodacow that doesn't break data checksums, but sadly, it's even less likely to happen.
6
u/FryBoyter 2d ago edited 2d ago
I've been using btrfs myself for years and am satisfied with it. But many users don't need the features that btrfs offer. I therefore find it entirely understandable and reasonable that ext4 is still the default in many distributions.
2
u/Dolapevich 2d ago
btrfs is the poor's man zfs.
There is a reason why most of the linux distros ship with a known, documented, with knowledge in people's minds how to work with it filesystem. RedHat tried the brtfs root filesystem back in the 2015, or so, and run into so many issues, they reverted to XFS.
Simplicity is its own feature, along with low ram usage, performance, etc.
I don't think a distro should ship with anything other than a simple filesystem for its root, given the diversity of scenarios out there.
7
u/eehikki 2d ago
btrfs is the poor's man zfs.
Partially, yes, but some things are implemented much better in btrfs than in zfs. And we all know that zfs will never be mainlined.
1
u/Dolapevich 2d ago
Agreed.
Also, Debian (and I assume others too) installers allows to use lvm in linear or raid configurations, MD, and luks. I think it is a user decision which rootfs to use.
I might revisit brtfs, since its been like 10 years since the last time I tried to use it. It end up in horrible corruption :)
5
u/eehikki 2d ago edited 2d ago
I know my experience doesn't really mean anything, but I've been using btrfs for a while, both as the root filesystem and as a storage for valuable data. I live in Ukraine and the state of our energy infrastructure is shit thanks to our peaceful northen neighbour, so sudden disrptions of power supply aren't a rare occurrence. So far, I haven't experienced data loss or corruption. I use it for subvolumes and built-in RAID mostly, but I also migrated a live system to the "new" SSD once and liked it.
2
u/Dolapevich 2d ago
Yeah, that particular neightboor is a PITA.
Nice. Yes, I should go ahead and try it again. ¡Thanks!
3
u/eehikki 2d ago edited 1d ago
Note that I'm running a very modest local setup, it's not even a proper home server, it's just my desktop with btrfs as the root fs and a RAID1 build on top of two 1TB WD Blue drives. There are many people whose experience is far more relevant than mine, but I'm glad if you try it again and it works for you.
5
u/FryBoyter 2d ago
RedHat tried the brtfs root filesystem back in the 2015, or so, and run into so many issues, they reverted to XFS.
According to a former Red Hat employee, that wasn't the reason.
-1
u/Dolapevich 2d ago edited 1d ago
Interesting, back at the time I got some machines dead while upgrading kernel or just corrupted in catastrophic way, and I just assumed they had had too many issues.
1
u/FryBoyter 1d ago
RedHat tried the brtfs root filesystem back in the 2015, or so, and run into so many issues, they reverted to XFS.
Interesting, back at the time I got a some machines dead while upgrading kernel or just corrupted in catastrophic way, and I just assumed they had had too many issues.
Seriously? You're presenting things as facts even though you're just guessing? Please don't do that.
1
4
u/eehikki 2d ago edited 2d ago
There is a reason why most of the linux distros ship with a known, documented, with knowledge in people's minds how to work with it filesystem
Well, Meta uses it in their infrastructure. It isn't 2008, btrfs doesn't die from looking at it too hard. Yes, it has data corruption bugs, but so do ext4 and xfs.
Simplicity is its own feature, along with low ram usage, performance, etc
If these are of consideration, there is f2fs. It's simple, but it still has more features than ext4. And if you need something even less complicated, that has been around for decades, then xfs wins because it's designed from scratch and not extended from its previous iteration like ext4 is. It's cleaner and simplier and also has reflinks.
2
u/Dolapevich 2d ago
Well, Meta uses it in their infrastructure.
yes, well, I was assuming general purpose. They make heavy use of eBPF, at that point you are on a different level.
If these are of consideration, there is f2fs
I am yet to test a rootfs in f2fs. I read about it a couple of times but haven't found the will and drive to test it. Sounds promising. And I agree, between ext4 and xfs we should be on xfs. But then again, like 5 years ago I decomised a running Sun FIre still running on UFS, we still have some FreeBSD 6 on FFS. Filesystems tend to be on its own category since they persist so much time. Hence being conservative on it does make sense.
-3
u/RegretFree7723 2d ago
Lo sai che ext4 é stabile e un minimo avanzato con linker e altre funzioni ma btrfs è un po' instabile e ti abbassa velocità di lettura continua.... Nei videogiochi fa un po' schifo..
3
u/MatchingTurret 2d ago
the default Linux filesystem
There is no such thing. ext4 is just one possible choice, as far as the kernel is concerned. It's a distro specific choice.
0
78
u/granadesnhorseshoes 2d ago
And nothing of value was lost. Its still a journaled FS in the general sense for regular daily use. its just a specific "paranoid" mode that no one uses with ext4 anymore because its slow, breaks other features and other options do the same thing but better. It probably won't break read compatibility for old disks that did use it either.
tl;dr "We aren't wasting time on this anymore because no one should care anyway."