Re: [PATCH RFC 0/3] bcachefs: add framework for internal Rust code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 07, 2024 at 12:06:05PM +0100, Miguel Ojeda wrote:
> On Wed, Feb 7, 2024 at 6:57 AM Thomas Bertschinger
> <tahbertschinger@xxxxxxxxx> wrote:
> > I wasn't sure if this needed to be an RFC based on the current status
> > of accepting Rust code outside of the rust/ tree, so I designated it as
> > such to be safe. However, Kent plans to merge rust+bcachefs code in the
> > 6.9 merge window, so I hope at least the first 2 patches in this series,
> > the ones that actually enable Rust for bcachefs, can be accepted.
> 
> This is worrying -- there has been no discussion about mixing C and
> Rust like this, but you say it is targeted for 6.9. I feel there is a
> disconnect somewhere. Perhaps it would be a good idea to have a quick
> meeting about this.
> 
> Cheers,
> Miguel

That could be a good idea; what format do you suggest?

One question that I would like clarity on is if in general work to add
Rust into something like fs/bcachefs/ can be accepted at this point.
That is, is it realistic to expect that an upcoming kernel release could
include Rust code in fs/bcachefs/ at all (even if not in the form in
this patch series)?

Kent has been suggesting his plan to do this for a while, I think, but I
haven't yet seen many explicit statements about what would, and would
not be accepted into an upstream kernel for rust+bcachefs. (If I missed
any conversations where this was laid out, please let me know.)

Actually, the previous paragraphs in your email are helpful in terms
of laying out concrete expectations, so thank you.

You talk about using the broader kernel Rust APIs like the proposed VFS
layer. What about bindings for internal bcachefs APIs, like the btree
interface [1] that Kent mentioned in another response?

Would a v2 of this series, that removes the current 3rd patch and replaces
it with a patch to add in the bcachefs btree bindings, be more suitable
for acceptance upstream?

I think testing the VFS abstractions for bcachefs sounds like a very
worthwhile project--but it also sounds like a distinct project from
Kent's goals for integrating Rust into bcachefs in the near term.

[1] https://evilpiepirate.org/git/bcachefs-tools.git/tree/bch_bindgen/src/btree.rs

- Thomas Bertschinger




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux