Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for filesystem abstractions #1004

Open
ariel-miculas opened this issue Apr 25, 2023 · 3 comments
Open

Support for filesystem abstractions #1004

ariel-miculas opened this issue Apr 25, 2023 · 3 comments
Labels
• lib Related to the `rust/` library.

Comments

@ariel-miculas
Copy link

I've opened this issue to track the missing pieces for the initial rust filesystem abstractions.
I have backported @wedsonaf's branch fs on top of rust-next to get a sense about the missing modules, see rust-next-fs.
Here's a list of the missing parts:

  • modules: cred, delay, file, fs, fs/param, io_buffer, iov_iter, mm, pages, user_ptr
  • macros: count_paren_items in driver.rs, from_kernel_result in error.rs, offset_of/container_of in lib.rs
  • allocator_api in rust_allowed_features
  • unstable features: associated_type_defaults, c_size_t, const_mut_refs, duration_constants
  • some helper functions in rust/helpers.c

The dependencies between the modules are:

  • fs depends on file, delay and fs/param
  • file depends on cred, fs, mm, io_buffer, iov_iter and user_ptr
  • mm depends on pages
  • iov_iter depends on io_buffer
  • pages depends on io_buffer
  • user_ptr depends on io_buffer

graph
One strategy would be to start bottom-up, starting with io_buffer, page, iov_iter, cred and user_ptr and then continue with the rest. Remains to be seen how much of the code can be backported as it is and how much it needs to be changed.

@ojeda ojeda added the • lib Related to the `rust/` library. label Apr 25, 2023
@jyizheng
Copy link

I am happy to contribute to this issue.

@ariel-miculas
Copy link
Author

The latest development is this patch series by Wedson Almeida which introduces abstractions for read-only filesystems.

@ariel-miculas
Copy link
Author

FYI Wedson recently sent another patch series for the filesystem abstractions: https://lore.kernel.org/rust-for-linux/20240514131711.379322-1-wedsonaf@gmail.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
• lib Related to the `rust/` library.
Development

No branches or pull requests

3 participants