cberner / fuser

Filesystem in Userspace (FUSE) for Rust
MIT License
835 stars 114 forks source link

How to enable libfuse debug #251

Closed RRRadicalEdward closed 1 year ago

RRRadicalEdward commented 1 year ago

Hi! I don't understand how I can enable libfuse debug. I tried pass MountOption as MountOption::CUSTOM("debug".to_string()) and MountOption::CUSTOM("-f".to_string()), but they seem to do nothing. Any help appreciated 🙂

cberner commented 1 year ago

fuser only uses a small set of libfuse API calls (these for libfuse2 and these for libfuse3), so they might not have any debug logging

RRRadicalEdward commented 1 year ago

Fuse logging can be enabled if path MountOption::CUSTOM("--debug") and modify a little bit fuser to pass CUSTOM options without "-o" to fuse. image But fuse low-level API does little of logging itself. It's not really useful for debugging.

I'm implementing virtual file system using fuser. Actually, my issue that I can't do cd in my file system after mounting. fuser and fuse doesn't log anything useful to fix the issue. After digging more in fuser and fuse, I noticed that an operation (e.g readdir) result (pid, guid, ino, etc.) is transmitted through a channel. I found that fuse sends a message with error code though this channel if an error happens, but I didn't find how fuser handles such messages. Does it? Can it that these types of message aren't simply parsed by fuser?

RRRadicalEdward commented 1 year ago

Ok. It seems like kernel handles the error. I hope I will be lucky to fix my issue 😄