While working on my cow-optimized feature (cowolf) I found an issue today.
When copy-up (copying file from lower branch to upper branch) is in progress, doing "ls" shows incorrect file size (it shows the size it copied so far). As expected, it happens for large files when it takes longer time to copy (on the top of that, I have a very slow NFS mount).
I made some fix (which solves my problem). In this fix, it creates a "_COPYUP~" metafile to indicates copy-up-in-progress. But most likely this fix does not address other corner cases. For example, two simultaneous write() operations taking places and both triggering copy-up.
While working on my cow-optimized feature (cowolf) I found an issue today.
When copy-up (copying file from lower branch to upper branch) is in progress, doing "ls" shows incorrect file size (it shows the size it copied so far). As expected, it happens for large files when it takes longer time to copy (on the top of that, I have a very slow NFS mount).
I made some fix (which solves my problem). In this fix, it creates a "_COPYUP~" metafile to indicates copy-up-in-progress. But most likely this fix does not address other corner cases. For example, two simultaneous write() operations taking places and both triggering copy-up.
Here, the fix: https://github.com/pralaydak/unionfs-fuse/tree/copyup_fix
There is test script test_copyup.py included as well.