From owner-freebsd-fs@freebsd.org Tue Apr 5 22:21:22 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F150AB03268 for ; Tue, 5 Apr 2016 22:21:22 +0000 (UTC) (envelope-from nishida@asusa.net) Received: from asusam.asj-hosting.net (asusa.asj-hosting.net [219.118.222.245]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (Client CN "*.asj-hosting.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF4C1F2E for ; Tue, 5 Apr 2016 22:21:21 +0000 (UTC) (envelope-from nishida@asusa.net) Received: (qmail 50017 invoked by uid 89); 6 Apr 2016 07:21:13 +0900 X-ASJ-Track-ID: <20160405222113.50017.qmail@asusam.asj-hosting.net> X-Spam-Checker-Version: ASJ KMsrv Spam Check Process Internal X-Spam-Status: No, hits=0.0 X-Spam-Flag: No X-Virus-Scanned: ASJ KMsrv Virus Check Process 08041001 X-ASJ-SMTP-Authentication: nishida@asusa.net X-ASJ-Arrival-IP: 50.207.112.201 X-ASJ-SPF-Info: auth X-ASJ-Scan-ID: <1459894873.234244.50010@asusam.asj-hosting.net> X-ASJ-Received-SPF: pass (send with smtp authentication by nishida@asusa.net@50.207.112.201) Received: from gw.asusa.net (HELO rd03.asusa-internal.net) (nishida@asusa.net@50.207.112.201) by asusams.asj-hosting.net with ESMTPS (AES128-SHA encrypted); 6 Apr 2016 07:21:13 +0900 Subject: Re: Problem with FUSE + fts To: freebsd-fs@freebsd.org 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> From: Hiroshi Nishida Message-ID: <57043A57.7030705@asusa.net> Date: Tue, 5 Apr 2016 15:21:11 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <56FD4788.5030808@asusa.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2016 22:21:23 -0000 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