Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Apr 2016 15:21:11 -0700
From:      Hiroshi Nishida <nishida@asusa.net>
To:        freebsd-fs@freebsd.org
Subject:   Re: Problem with FUSE + fts
Message-ID:  <57043A57.7030705@asusa.net>
In-Reply-To: <56FD4788.5030808@asusa.net>
References:  <56F42EF4.5000505@asusa.net> <1294209833.31699182.1458950014610.JavaMail.zimbra@uoguelph.ca> <56F6148D.2030706@asusa.net> <56FAD050.2080707@asusa.net> <765991039.37160180.1459291777879.JavaMail.zimbra@uoguelph.ca> <56FB07DC.4000504@asusa.net> <2009006928.37186618.1459292816761.JavaMail.zimbra@uoguelph.ca> <56FB0DD0.4000806@asusa.net> <294037501.39717127.1459381643954.JavaMail.zimbra@uoguelph.ca> <56FD4788.5030808@asusa.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Since there is no response even at fuse-devel ML, I would like to write down a solution here.

* Symptom
When using a command that calls fts_read() like "find" or "rm -r" for a FUSE based filesystem, it outputs "No such file or directory" for some files/directories that exist.

* Solution
In /usr/ports/sysutils/fusefs-libs/work/libfuse-fuse_X_X_X/lib/fuse.c, the following struct is declared:

static struct fuse_lowlevel_ops fuse_path_ops = {
         .init = fuse_lib_init,
         .destroy = fuse_lib_destroy,
         .lookup = fuse_lib_lookup,
         .forget = fuse_lib_forget,
         .forget_multi = fuse_lib_forget_multi,
         .getattr = fuse_lib_getattr,

Here, comment out .forget and .forget_multi lines like:

static struct fuse_lowlevel_ops fuse_path_ops = {
         .init = fuse_lib_init,
         .destroy = fuse_lib_destroy,
         .lookup = fuse_lib_lookup,
         //.forget = fuse_lib_forget,
         //.forget_multi = fuse_lib_forget_multi,
         .getattr = fuse_lib_getattr,

Alternatively, you can use "noforget" mount option, though I'm not sure if it can be used for high level APIs like fuse_main().

-- 
Hiroshi Nishida
nishida@asusa.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57043A57.7030705>