Date: Thu, 04 Sep 2014 17:21:41 -0700 From: Julian Elischer <julian@freebsd.org> To: FreeBSD Current <current@freebsd.org>, fs@freebsd.org Subject: fuse libfuse and teh fuse_mount call with options Message-ID: <54090215.4080006@freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54090215.4080006>