Code Monkey home page Code Monkey logo

Comments (5)

droundy avatar droundy commented on May 30, 2024 3

I'll add mention that a path name based API had the disadvantage of making it impossible to create a posix compliant (aka correct) file system. Unless you do not, for instance allow file deletion. So it would be ideal to make this clear in the documentation for any such API.

A path name based API is not a safe and easy API, but rather an easy but sloppy and incorrect API.

from fuse-rs.

droundy avatar droundy commented on May 30, 2024 2

I want to qualify what I wrote about a path name based API. Such an API can (I think) be entirely safe, if you force the use of the "fh" field when appropriate, e.g. by not providing paths on read/write, etc. So far as I know this would make the API safe, since then when a file is opened, you'd have to create some sort of reference to it other than its path, so it could continue being read after it is deleted.

from fuse-rs.

zargony avatar zargony commented on May 30, 2024 1

The idea is not to modify the current API to take paths, but to have an additional API.
Using paths is convenient, but it adds the overhead of lookups or conversion functions since the kernel internally always works with inodes. So, the existing Filesystem trait is supposed to stay like this (libfuse has fuse_lowlevel_ops) for a minimal-overhead interface.
An API with paths would internally again use the API with inodes and "just" needs to convert between paths and inodes. This shouldn't be too hard and could be done with lookup tables (HashMap) or by using path hashes as inode numbers. But unfortunately, nobody has taken the time to design it yet.

from fuse-rs.

roblabla avatar roblabla commented on May 30, 2024

I came accross https://github.com/anowell/netfuse just now, which seems to be good enough for most basic operations (it's missing lots of ops though).

from fuse-rs.

wfraser avatar wfraser commented on May 30, 2024

I'm also working on https://github.com/wfraser/fuse-mt which sits on top of rust-fuse and does inode->path translation, and adds multi-threading for some I/O operations. It's a work-in-progress that I haven't had much time to work on lately, though.

from fuse-rs.

Related Issues (20)

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.