dimkr wrote: ↑Thu Jul 04, 2024 10:50 am
overlay is part of the kernel itself, it's not a third-party addon, so it doesn't break like aufs does and doesn't need this extra maintenance work.
I beg to differ.
overlayfs was once upon a time, an add-on too. Just like aufs, overlayfs was once a external kernel module, just like aufs. There is no difference in that aspect.
The only difference is, the guys in charge of the kernel decided to "adopt" it and include it in the kernel source code that they release, while aufs is not included. To use overlayfs, you just need to enable it, and compile the kernel. To use aufs, you need to "bring it into the kernel" - this is what "aufs patches" do. But once brought-in, aufs works and compiles exactly like overlayfs. There is no difference.
So why didn't the kernel guys adopt aufs too? Who knows. The official reason is because aufs is "too complex" - but then they accepted untested, brand-new, 27,000 SLOC of code for the NTFS3 driver without even blinking. Hmmm. Might need to look up who is the sponsor behind overlayfs. It might give you a clue.
There is no difference in terms of "bugs" whether the code is in the kernel source release, or outside. People who follows the overlayfs development would remember that the first release of overlayfs as a in-built kernel module was extremely buggy to the point of it was almost useless (except for a very niche use case - the only use case used and tested by the promotor of the overlayfs code before it was merged; as opposed to aufs which had been stable for __years__).
Another case in point, regarding that NTFS3 code example. Have you got any corrupted filesystem because of aufs? How about because of in-kernel NTFS3? Hmmm, it makes you think, doesn't it?
Things have gotten better since (for overlayfs), but not because it is "part of the kernel", but because somebody somewhere spent some effort to fix those bugs.
Which brings us to "bug-fixing", or maintenance. As far as maintenance is concerned, __everything__ related to kernel has to be maintained, whether it is "part of the kernel source code", or anything outside it. The kernel changes all the time, and the changes always break things (inside and outside kernel). There is no magic that because something in included in the kernel source, it is maintenance-free. The maintainers of certain part of the kernels (whether or not the code is part of the kernel source code, or outside; whether the guys maintaining it are part of the kernel team, or outside) have to do the work, or their stuff will break on the next kernel release. Overlayfs, just like aufs (and any other parts of the kernel), has to be maintained, or it will break.
The only difference is, if the kernel module is included in the kernel, then other people in the kernel team might do the work for the actual maintainer if the maintainer of that module disappears for a while. Most changes are only trivial interface changes, and such changes can be adapted so that the module still builds, without changing the functional part of the module code itself. But, doing such changes is no guarantee that the module still performs correctly. It only enables the module to build.
Contrast this to the external kernel module, where there is no holiday for the maintainer. If the kernel changes its interfaces, the maintainer has to adapt to it or the module won't even compile. For all other aspects, however, the maintenance process is identical.
Hence, it is clearly a myth that because the module is included in the kernel source, it will always be "more correct" or "less buggy" that external module. The correctness or bugginess depends on the effort put by the maintainers of that piece of the code, irregardless of whether the code is inside or outside.
Here's a food for thought. Aufs isn't the only external module in the world. You people who have used some USB wifi dongle, especially the ones with Realtek chips inside, are aware that most of them aren't supported directly by the kernel. External kernel modules are required. Are they bad? Shall we not use them? Hmmm.
Or how about nvidia, then. The included kernel module to handle nvidia kernel module, known as "nouevau", is thoroughly and completely buggy. It may be enough if what you do on your laptop is using libreoffice, but once you start something more serious about it, e.g. watching youtube, or worse if you start doing something with 3D in it (not necessarily for gaming, it can be for something else e.g. google earth, blender, etc), then you need some serious, non-buggy driver. Where do you get this non-buggy driver? From nvidia themselves, of course. The proprietary nvidia driver. This is, guess what, an external module, maintained by nvidia people, not from the kernel team. Are we going to dismiss this proprietary driver because it's not included in the kernel? Hmmmm.
One day, aufs will die. Like everything else.
Nobody or nothing will live or last forever.
But not today. Not yet.
In my opinion, aufs demise has been greatly exaggerated.
aufs is still maintained.
The author/maintainer has not indicated that he would retire very soon either.
As far as I'm concerned, it is still very much alive.
It's okay to prepare for the future.
But not by sacrificing the present.
I'm a pragmatist. I use what works. I use the best tool for the job.
And for now, for me, it is aufs.