Giter Club home page Giter Club logo

fuse-mt's Introduction

FUSE-MT

Build Status Crates.io

Documentation

This code is a wrapper on top of the Rust FUSE crate with the following additions:

  • Dispatch system calls on multiple threads, so that e.g. I/O doesn't block directory listing.
  • Optionally translate inodes into paths, to simplify filesystem implementation.

The fuser crate provides a minimal, low-level access to the FUSE kernel API, whereas this crate is more high-level, like the FUSE C API.

It includes a sample filesystem that uses the crate to pass all system calls through to another filesystem at any arbitrary path.

This is a work-in-progress. Bug reports, pull requests, and other feedback are welcome!

Some random notes on the implementation:

  • The trait that filesystems will implement is called FilesystemMT<'_>, and instead of the FUSE crate's convention of having methods return void and including a "reply" parameter, the methods return their values. This feels more idiomatic to me. They also take &Path arguments instead of inode numbers.
  • If you do not wish fuse-mt to translate inode numbers into &Path but still retain the comfort of fuse-mt you may implement FilesystemMT<'_, Inode, RawFileAttr> and RawFilesystemMT instead. All methods will then receive u64 as their input.
  • Currently, only the following calls are dispatched to other threads:
    • read
    • write
    • flush
    • fsync
  • Other calls run synchronously on the main thread because either it is expected that they will complete quickly and/or they require mutating internal state of the InodeTranslator and I want to avoid needing locking in there.
  • The inode/path translation is always done on the main thread.
  • It might be a good idea to limit the number of concurrent read and write operations in flight. I'm not sure yet how many outstanding read/write requests FUSE will issue though, so it might be a non-issue.

fuse-mt's People

Contributors

wfraser avatar not-jan avatar amosonn avatar losynix avatar renyuneyun avatar sector-f avatar cberner avatar tailhook avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.