7 ms·
The risk is in trying to keep compatible with the Linux Kernel, when not part of the Linux Kernel dev team. If ZFS was a module within the Linux kernel source
by joecot 8y ago
The risk is in trying to keep compatible with the Linux Kernel, when not part of the Linux Kernel dev team.
If ZFS was a module within the Linux kernel source tree, Linux kernel devs would keep it in mind when making changes to the Linux kernel's APIs. They wouldn't make potentially breaking changes to that API, or replace APIs with ones that can't be made compatible with ZFS at all, without considering the effect it would have on ZFS. The Kernel devs have to take the whole tree into account, including all the modules.
But since ZoL is not part of the kernel, and is instead a separate independent module that gets loaded into the kernel, the ZoL have to play catch up. Instead of Kernel devs working with them to make sure things stay compatible, or giving them a heads up when something needs to be changed for a new version, the ZoL team is on the outside, trying to make sure they don't get boxed out of the Kernel API.
It can be a tenuous position to be in. For a more everyday example, look at the Firefox and Chromium browser updates. For Firefox Quantum they completely revamped their extensions system, making all existing extensions worthless. Either the extension devs rewrote them with the new API, or the extension is just gone. Similarly Chromium is changing its API for how extensions can interact with the DOM and networking, which would make Ublock unusable. If these features were officially part of the browser or official extensions, the browser devs would work with the extension devs to make sure things stayed working; instead the extension developers need to keep up or watch their product die.
If the Linux Kernel completely changed its module API, and ZoL was caught flat footed and needed to make substantial rewrites, what would the projects backers do? Would they commit the dev time and resources needed to make those changes, or would they compare the benefits of ZFS vs the competition -- solutions based on btrfs or LVM, both built into the kernel -- and decide to jump ship before committing more time? That's where the danger really lies. If the Linux Kernel makes a serious breaking change, ZoL's supporters might double down to fix it, or they might just cut their losses.
And while there is an official way to integrate external filesystems into the Linux kernel, FUSE, it's extremely slow compared to Kernel native modules. There was a userland FUSE implementation of ZFS, and there's a reason it's fallen out of favor. ZoL is significantly faster because of its direct kernel extension, but it's playing with fire by not being part of the kernel tree itself.
- sandGorgon 8y agohttps://lkml.org/lkml/2018/8/3/621 https://lkml.org/lkml/2018/8/3/621 > Yeah, HELL NO! Guess what? You're wrong. YOU ARE MISSING THE #1 KERNEL RULE. We do not regress, and we do not regress exactly because your are 100% wrong. And the reason you state for your opinion is in fact exactly WHY you are wrong. Your "good reasons" are pure and utter garbage. The whole point of "we do not regress" is so that people can upgrade the kernel and never have to worry about it. -Linus Torvalds
- mnd999 8y agoPretty sure that only applies to userland apps, not kernel modules.
- joecot 8y agoThe linux kernel has made breaking changes [1] and deprecated APIs [2] internal APIs before. Specifically, your example brings up the danger that ZoL is in. The Linux kernel does everything in their power to not break User Land APIs. ZoL isn't User Land, and it replaced the previously extremely slow User Land ZFS Linux implementation. It is a Linux kernel module, and as [2] notes, Linux kernel devs are absolutely allowed to make breaking changes to internal APIs. The cost of the increased speed of a Kernel module is the risk of internal API breaking changes. I highly doubt that Linus would scream anywhere near as much about an internal API change that broke a separately maintained linux module with non-GPL code. 1. https://stackoverflow.com/questions/24897511/what-is-the-replacement-of-daemonize-kernal-api-in-3-x-kernel https://stackoverflow.com/questions/24897511/what-is-the-rep... 2. https://lwn.net/Articles/769365/ https://lwn.net/Articles/769365/
- cryptonector 8y agoThat's about the ABI to user-land, not about internal-to-the-kernel interfaces.
- cryptonector 8y ago> The risk is in trying to keep compatible with the Linux Kernel, when not part of the Linux Kernel dev team. But... that was already the case.