Hello everyone else ;-),
I'm currently debugging a possible fuse4x kext bug. Maybe you can give me some hints.
We want to use the nolocalcaches option with bindfs.
How to reproduce:
mkdir /Volumes/loop # create the mountpoint
mkdir /tmp/Test # create the test folder
sudo ./loopback /Volumes/loop -omodules=threadid:subdir,subdir=/tmp/ -oallow_other,native_xattr,volname=LoopbackFS,novncache #mount the volume
dd if=/dev/zero of=/Volumes/loop/Test/test.img bs=8192 #write a file
Now open the folder /Volumes/loop/Test in Finder and select the file test.img (maybe you have to do it several times).
After a few tries dd stops with the following error message: Invalid argument
Conclusion
Therefore I used the following command:
sudo ./loopback /Volumes/loop -omodules=threadid:subdir,subdir=/tmp/ -oallow_other,native_xattr,volname=LoopbackFS,noreadahead,noubc,novncache
After a few tests I found out, that novncache causes the problem. As soon as you remove it everything is working - But it's not directly causing it!
This command is working: sudo ./loopback /Volumes/loop -omodules=threadid:subdir,subdir=/tmp/ -oallow_other,native_xattr,volname=LoopbackFS,novncache
Then I looked at the fuse_isnovncache function in the fuse_internal.h file:
/* In our model, direct_io implies no UBC. */
return fuse_isdirectio(vp);
Using this information I changed the options to:
sudo ./loopback /Volumes/loop -omodules=threadid:subdir,subdir=/tmp/ -oallow_other,native_xattr,volname=LoopbackFS,noreadahead,noubc,direct_io
As far as I can tell it's also working!
Do you have any hint? - What could cause this behaviour?