Comments (5)
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.
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.
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.
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.
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)
- Is it Rust re-implementation of libfuse or just bindings to libfuse? HOT 5
- Feature request: Allow for configuring `max_write`
- Unknown FUSE opcode (39) HOT 8
- how to handle interrupted while setlk
- how to implement setlk and getlk rightly HOT 2
- Truncate? HOT 4
- Examples panic if not providing any mount point HOT 1
- New release? 0.3.1 is a bit outdated now HOT 8
- Can Channel.receive() be interrupted?
- destroy() not being called. HOT 2
- crate works with macFUSE 4.0.5 but needs build.rs update HOT 1
- Read file using inode number HOT 2
- fuse-rs does not compile on systems with libfuse3 HOT 1
- fuse-rs cannot build with target x86_64-unknown-linux-musl HOT 2
- hello.rs mount dir block HOT 1
- failed to run null example code
- How to use high-level Fuse API?
- Stale data (zeros) returned under specific circumstances HOT 1
- Is this library still maintained? HOT 1
- wrong version in readme
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuse-rs.