News for hackers. Stuff that matters.
Re:Rust for Filesystems by lelanthran on Monday July 15, 2024 @08:02AM (#40967054)
> To my knowledge most if not all of these people driving Rust adoption in Linux are seasoned Linux contributors and/or maintainers. They are not outsiders "coming to other people's projects".

Not in this case. It's the Rust evangelist who is the newcomer. FTA:

> Almeida said that he is not trying to keep the C API static; his goal is to get the filesystem developers to explain the semantics of the API so that they can be encoded into Rust.

The responses from the kernel team members to the proposal seem reasoned and mature to me:

> In addition, when the C code changes, the Rust code needs to follow along, but who is going to do that work?

> As the C code evolves, which will happen more quickly than with the Rust code, at least initially, there will be a need to keep the two APIs in sync.

> The object lifecycles are being encoded into the Rust API, but there is no equivalent of that in C; if someone changes the lifecycle of the object on one side, the other will have bugs.

> Encoding a single lifecycle understanding into the API means that its functions will not work for some filesystems.

> Part of the problem, Ted Ts'o said, is that there is an effort to get "everyone to switch over to the religion" of Rust; that will not happen, he said, because there are 50+ different filesystems in Linux that will not be instantaneously converted.

> Bottomley said that as more of those semantics get encoded into the bindings, they will become more fragile from a synchronization standpoint

> But Ts'o pointedly said that not everyone will learn Rust; if he makes a change, he will fix all of the affected C code, but, "because I don't know Rust, I am not going to fix the Rust bindings, sorry".

Re:Rust for Filesystems by rcxdude on Monday July 15, 2024 @08:10AM (#40967110)
The other person behind the proposal, is however a seasoned kernel developer, with >14 years of experience working in the FS subsystem of linux.
Re:Rust for Filesystems by tucnak on Monday July 15, 2024 @08:34AM (#40967277)
This is case-in-point; bcachefs maintainer is merely _entertaining_ the ideas proposed by the Rust evangelist, with the express intent of exploring alternatives... and suddenly it's enough for "the movement" to co-opt him into the "proposal" [to include Rust in the FS subsystem], it seeems. Are Rust supporters really as desperate so-as to co-opt ANY interest in the subject?? This toxicity is not helping anybody.
Re:Rust for Filesystems by dralley on Monday July 15, 2024 @10:02AM (#40967993)
I think you're misunderstanding the situation.

Kent Overstreet is the bcachefs maintainer and he's extremely pro-Rust. He has in fact talked about wanting to move bcachefs to Rust, and the userspace tools for bcachefs are already written in Rust.

He's been participating in the mailing list discussions about using Rust / providing Rust APIs for the FS subsystem.

I don't know who you're confusing him with, but you're confusing him with someone else.

Re:Rust for Filesystems by _flux on Monday July 15, 2024 @09:32AM (#40967751)
I'm not sure what you are saying. Maybe the first proposal isn't the best one, so some exploration is warranted.

Is Kent an unwilling pawn in the game of getting Rust implemented in the Linux kernel? Or is he not serious enough about getting it in that his support should not be considered?

From what I've seen it reads to me Kent would be very happy to implement bcachefs in Rust in the Linux kernel. Bcachefs-tools does make use of it.

Re:Rust for Filesystems by pimeys on Monday July 15, 2024 @10:30AM (#40968195)
Kent has been really vocal about writing bcachefs in Rust in the IRC channel. They even started some work already, but decided to wait until the common abstractions are ready and merged.
Re:Rust for Filesystems by tucnak on Monday July 15, 2024 @09:53AM (#40967921)
> Is Kent an unwilling pawn in the game of getting Rust implemented in the Linux kernel? Or is he not serious enough about getting it in that his support should not be considered?

Neither. In fact, Kent is the only person in this story that has any agency with respect to Linux whatsoever; he's the reason we're having this conversation in the first place. And indeed, this is also the reason Rust people wish to co-opt him so hard. This pattern of behaviour is not new; in fact, pretty much all "revolutionary" movements never pass on the chance to mistake good attitude (towards them) for unequivocal alliance in "the fight."

I like Rust in theory as much as the next guy, and the code is great, for one I think the kernel developers' concerns are slightly misplaced, but in practice I wouldn't want Rust people anywhere near my machines. Linux is a pretty old, and subpar operating system; it takes a great deal of effort to execute on it & only a handful of distributions (Debian) manage to get it right in the first place! Why don't they go for some other OS? There's Plan 9, there's Fuchsia, it's not like Linux is the only path forward. But they don't want to be writing file systems; instead, the only goal that matters to them is getting to the heart of the most popular OS, so as to secure some longterm success.

It all stems from insecurity, if you ask me.

Re:Rust for Filesystems by pjc50 on Monday July 15, 2024 @10:01AM (#40967982)
> But they don't want to be writing file systems; instead, the only goal that matters to them is getting to the heart of the most popular OS, so as to secure some longterm success.

Wrong final word: security. In the war against remote exploits, harden the most widely used target first.

Rust only exists because getting people to reliably and consistently write secure C++ proved impossible.

(yes I know C++ is a much larger and more complicated language than C)

Re:Rust for Filesystems by tucnak on Monday July 15, 2024 @10:23AM (#40968140)
IBM had full safety in terms of trusted program translation and memory tagging capability since the 90s, and yet the wider industry, Linux cheapskates couldn't care less about (1) ECC memory, (2) memory tagging. Now we have Arm MTE which is a step in the right direction, and CHERI capability-programming, which is really making progress in RISC-V community.

If the Linux community was serious about, and not just cheap + ignorant, we wouldn't be having this conversation in the first place. Pandering programming language-equivalent of condom ads to this very community is not a sign of smarts, or great aspiration, but cluelessness and naivety.

Re:Rust for Filesystems by pjc50 on Monday July 15, 2024 @10:34AM (#40968228)
Man, an omni-hater, not just hating people trying to bring Rust to Linux but also hating on Linux. Must be a very rewarding sense of superiority.

> ECC memory

This is entirely Intel's fault.

Re:Rust for Filesystems by rascul on Monday July 15, 2024 @09:09AM (#40967570)
> Not in this case. It's the Rust evangelist who is the newcomer. FTA:

From a quick search, I've found that the person is somewhat active in kernel commits over the last four years (mostly but not all rust related from what I see) and is involved in some lkml stuff and some commits over a decade ago. Not sure if this makes him a newcomer or not, just wanted to provide a bit more context.