Reputation: 1220
I'm writing a fuse file system that mount one directory to itself. I want to log some calls (flush
for example). I've started to adapt fuse tutorial sample code. If I try to bind any directory it works great:
./bbfs -o nonempty ./test ./test
but if I try to bind particular root directory ("/"):
sudo ./bbfs -o nonempty / /
no one line is in logfile.
Is it possible?
My mangled version of sample program. I've changed only bbfs.c
file.
Upvotes: 4
Views: 2274
Reputation:
You can't mount a FUSE filesystem (or any other type of filesystem, for that matter) at /
, because your root filesystem is already there.
Doing so would be disastrous anyway, as mounting a filesystem at a path makes any files which previously existed under that path inaccessible. You can't use FUSE as a filter like this -- you will need to find another solution to whatever it is you're trying to do.
Upvotes: 1