Skip to content

Changes to metadata ignored when multiple modifications are performed under time limit #7

@LHLaurini

Description

@LHLaurini
$ 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:

fuse-copyfs/create.c

Lines 148 to 150 in 66b8df2

/* Check timestamp in order not to create bogus new versions */
if (time(NULL) - metadata->md_timestamp < TIME_LIMIT)
return 0;

If I set TIME_LIMIT to 0, the problem disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions