fuse libfuse and teh fuse_mount call with options

From: Julian Elischer <julian_at_freebsd.org>
Date: Thu, 04 Sep 2014 17:21:41 -0700
the documentation for using the fuse library seems a bit light..

I want to stop a fuse filesystem from getting cached by the buffer cache.
(the data is dynamic)
mount_fuse(8) says I need to add the direct-io mount option,
but the mount is being done by the library call fuse_mount().
I've been hunting around for examples of how to use this argument
when using the library call.


the code curently looks like:
[...]
     char *mp = arg; /* mountpoint */
     struct fuse_args *farg = NULL;

#ifdef DP_DEBUG
     /* enable fuse debugging */
     struct fuse_args fa;
     char *argv[3];

     argv[0] = "dp";
     argv[1] = "-d";
     argv[2] = NULL;

     fa.argc = 2;
     fa.argv = argv;
     fa.allocated = FALSE;
     farg = &fa;
#endif /* DP_PROC_DEBUG */

     /* unmount root (if stale) */
     dp_proc_unmount(mp);

     /* record load time */
     dp_proc_create_time = time(NULL);

     /* mount fuse filesystem */
     fc = fuse_mount(mp, farg);
     if (!fc) {
         printk("%s: fuse_mount() failed\n", __FUNCTION__);
         ASSERT(!"fuse_mount failed");
         return -1;
     }


======
dp -d seems to be the arguments to the daemon supplying data.
So I'm not really seeing a place to add "-o direct-io"

Our current work-around is to simply hack the fuse kernel module to just
disable the calls to the buffer cache. I'd rather 'turn it off' than
hack it off.

documetation of this library seems really thin on the ground. As are 
examples.

any help appreciated.


Julian
Received on Thu Sep 04 2014 - 22:21:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:51 UTC