Does FUSE tracks file changes in the source folder?

259 views
Skip to first unread message

robotive

unread,
Jan 13, 2013, 2:14:25 PM1/13/13
to osxfus...@googlegroups.com
Hi,

what happens when you modify files directly in the source folder and not via a mounted FUSE volume. Does FUSE knows about the changes, for example if a file was deleted? If not, is there a way to notify that there are changes?

Thanks,
Adrian.

Benjamin Fleischer

unread,
Jan 13, 2013, 8:20:32 PM1/13/13
to osxfus...@googlegroups.com
Hi Adrian,

That depends. Per default OSXFUSE uses kernel side caching to speed things up. This can cause OSXFUSE to miss external changes. To address this issue mount time option auto_cache had been introduced (back in MacFUSE). When using auto_cache OSXFUSE tries to be smart and purges the kernel side caches when an external change to a file or directory (file size or modification date) is detected during a getattr call.

When you are dealing with external changes and need to make sure that all local changes to a file (though the FUSE volume) get written back instantly you might want to consider using mount-time option noubc, which disables the kernel's "file contents" cache. As a side effect there is no kernel side caching for reads through the FUSE volume as well.

Then there is the vnode name cache. Using the vnode name cache can result in a new file that was created externally not being available (instantly) though the FUSE volume. But this is very implementation specific. The name cache can be disabled by using mount-time option novncache.

To disable all caches use option nolocalcaches. Please note that this should only be a measure of last resort and will have an performance impact.

In case your user space file system daemon is aware of external changes you can call function fuse_purge_np to notify the kernel of those external changes. In this case there should be no need to disable any kernel side cache.

I hope this helps. For more information about the mentioned mount-time options see http://code.google.com/p/macfuse/wiki/OPTIONS.

Regards,
Benjamin

robotive

unread,
Jan 14, 2013, 8:51:12 AM1/14/13
to osxfus...@googlegroups.com
Thanks Benjamin,

this clarified a lot to me.

Regards,
Adrian.

Lakshmi S

unread,
Dec 15, 2014, 4:25:13 AM12/15/14
to osxfus...@googlegroups.com
Hi Benjamin,

I am facing the same issue for contentsOfDirectoryAtPath: API, the changes that were done on server are not getting reflected for the directory that is locally present in download location, whereas the changes are getting reflected for the directory that is remote.
I have tried with the options that are listed below and also by changing the modification date in attributesOfItemAtPath: API call. Still the contents of the directory are not getting reflected in Finder.

On enabling debugging log in OSXFuse observed that the 'readdir' call is not getting called for the directory that is present in the download location.
Any suggestion this issue?
Thanks in advance.

Shiping Tan

unread,
Mar 28, 2016, 5:23:44 AM3/28/16
to OSXFUSE
i meet it too, howto solve it ?

在 2014年12月15日星期一 UTC+8下午5:25:13,Lakshmi S写道:

Alejandro Exojo

unread,
Mar 28, 2016, 4:19:51 PM3/28/16
to osxfus...@googlegroups.com

On 28 March 2016 at 11:23, Shiping Tan <tanshi...@gmail.com> wrote:
i meet it too, howto solve it ?


The function was deprecated since some time ago, and now is removed. The comment mentions "Use fuse_lowlevel_notify_inval_inode instead".
Reply all
Reply to author
Forward
0 new messages