On Mon, Mar 26, 2012 at 02:06:52PM +0100, Richard W.M. Jones wrote:
On Mon, Mar 26, 2012 at 10:00:53AM +0100, Richard W.M. Jones wrote:
> (1) We add FUSE support directly to the API, linking with libfuse.
> This is essentially the same as what was outlined in link [i] back in
> December 2011.
[...]
> The problem with (1) is that we are not confident that it's a good
> idea to use libfuse as a true library. It doesn't appear that anyone
> else is using it this way.
I'll also add that libfuse makes it tricky to use multiple handles.
Specifically, FUSE callbacks get no context at all, eg: getattr's
parameters are:
static int getattr (const char *path, struct stat *statbuf);
If libfuse could be called from multiple threads, each with its own
handle, then how would you know which handle to use? (The answer
possibly involves using thread-local storage, but that's hairy if
either handle is multithreaded).
Actually I'm wrong about this. Turns out there is a 'fuse_context'
call that you can make within handlers which returns the context.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming blog:
http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora