fuse-copyfs
fuse-copyfs copied to clipboard
Changes to metadata ignored when multiple modifications are performed under time limit
$ mkdir version-dir
$ mkdir mountpoint
$ copyfs-mount $PWD/version-dir mountpoint
/home/user/test/version-dir
$ cd mountpoint/
$ echo content > file; chmod 777 file
$ ls -lh
total 4,0K
-rw-r--r-- 1 user user 8 jan 28 19:37 file
$ chmod 777 file
$ ls -lh
total 4,0K
-rwxrwxrwx 1 user user 8 jan 28 19:37 file
As you can see, creating a file and then immediately changing its mode, will cause the mode change to be ignored. This is a problem when running scripts.
The problem seems to be caused by trying to avoid creating unnecessary versions: https://github.com/cognusion/fuse-copyfs/blob/66b8df2f0b678d20cdff7a42dc4830b90687f981/create.c#L148-L150
If I set TIME_LIMIT
to 0, the problem disappears.