Comments (5)
Hi,
thanks for the kind words! Unfortunately, it's been some time that I worked with FUSE and I'm not sure about opening flags myself anymore. I probably would expect it to be similar to what you describe. But if it's different, this is most probably not related to rust-fuse, since rust-fuse only forwards information between the FUSE kernel driver and a useful userspace interface. People of the OSXFUSE community should know a good answer on this I suppose.
from fuse-rs.
Hi,
Sorry for the delayed reply. I wanted to do some tests before replying.
Indeed, I see that my code is working as expected on Linux, with libfuse 2.9.4. The problem exists solely with OSXFUSE. It seems that a relevant bug was fixed in FreeBSD, too:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220185
This issue was reported for OSXFUSE, but was closed. Let's see what can be done there:
osxfuse/osxfuse#398
From my point of view, this issue can be closed here.
Thanks again!
from fuse-rs.
Thanks for making inquiries and for linking the related issues here.
from fuse-rs.
Unfortunately, I may have spoken too soon.
After some more tests, I see that writing works correctly with the standard fusexml_fh
C example on Linux, Mac and FreeBSD.
In my own FS, written in Rust using rust-fuse
, writing works correctly on Linux and FreeBSD, but still fails on macOS (OSXFUSE).
I guess there must be a problem in the way the the user-space part of rust-fuse
interacts with the OSXFUSE kernel module. I have to investigate further and will open a new ticket, if needed.
Cheers!
from fuse-rs.
Finally, I found the cause of the problem. It was a misuse of the flags
argument passed into the open
callback and back out in the call to reply.opened(...)
.
Basically I was forwarding the flags in between the two. When a file was opened with O_WRONLY
(==0x1), passing these flags to the reply meant that FOPEN_DIRECT_IO
was set for the opened file, causing the incorrect write. That is also why this problem never manifested when opening files in read mode.
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.