summaryrefslogtreecommitdiff
path: root/doc/bugs/FAT:_Date_resolution_for_mtime_2s--__62___implications.mdwn
blob: d4dcc26e3f3b55787dcd8974113e936e08c3a0fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
The Date resolution of the FAT filesystem is only 2 seconds for the "last modified time."
This leads to the strange behaviour, that after umount and remount of an usb drive (direct mode) git-annex thinks that suddenly approx. 50% of
the files are modified.  (after remount the "seconds" appears to be rounded to even values - the inode cache before unmount had 1 second resolution) So git-annex is not real "guilty" but it would be fine to create a "workaround" for this problem...

Possible the best solution for this is to set even values for the seconds in the filesystem and in annex internal tables direct after the `git annex get`. 
Other solution would be to treat differences up to 1s in modification time as unmodified or create an new parameter like rsync's "modify-window" for this. To do an `git annex sync` or `git annex add` is in my opinion not a good option, because one could add so Bad file content by accident...

Here's an konsole session to show this behaviour:

    $ mount /mnt/transfer/
    $ git clone source/ /mnt/transfer/transfer-repo

    Klone nach '/mnt/transfer/transfer-repo'...
    Fertig.

    $ cd /mnt/transfer/transfer-repo/
    $ git annex init "test"

    init test 
      Detected a filesystem without fifo support.

      Disabling ssh connection caching.

      Detected a crippled filesystem.

      Enabling direct mode.
    ok
    (Recording state in git...)

    $ git annex group here transfer

    group here (merging origin/git-annex into git-annex...)
    (Recording state in git...)
    ok
    (Recording state in git...)

    $ git annex wanted here standard

    wanted here ok
    (Recording state in git...)

    $ git annex get --auto

    get n01.mp3 (from origin...) 
    SHA256E-s1159018--5674452792970dc03e9ba47d3a8af5ad7c8da6b3ca19e8e64b9a4cf462d4a92d.mp3
         1159018 100%   82.62MB/s    0:00:00 (xfer#1, to-check=0/1)

    sent 1159308 bytes  received 31 bytes  2318678.00 bytes/sec
    total size is 1159018  speedup is 1.00
    ok

    get n02.mp3 (from origin...) 
    SHA256E-s1622113--03998dc10c4839d5ab9aeaceaa63f0363c9d728aaaca2a2707f025c7b9e920a3.mp3
     1622113 100%   34.45MB/s    0:00:00 (xfer#1, to-check=0/1)

    sent 1622459 bytes  received 31 bytes  3244980.00 bytes/sec
    total size is 1622113  speedup is 1.00
    ok

    ...
    ...

    –--> All 29 files (n01.mp3 to n29.mp3) successfully got

    (Recording state in git...)

    $ git annex status
    $ stat * >../stat-before-umount
    $ cd /
    $ umount /mnt/transfer 
    $ mount /mnt/transfer 
    $ cd /mnt/transfer/transfer-repo
    $ stat * >../stat-after-remount
    $ git annex status
    M n05.mp3
    M n10.mp3
    M n11.mp3
    M n13.mp3
    M n16.mp3
    M n17.mp3
    M n20.mp3
    M n22.mp3
    M n23.mp3
    M n24.mp3
    M n26.mp3
    M n27.mp3
    $ diff -u ../stat-before-umount ../stat-after-remount | grep -B8 "+Modifiziert" | grep -E "Datei:|Modifi"

       Datei: „n05.mp3“
    -Modifiziert: 2014-05-03 19:42:39.000000000 +0200
    +Modifiziert: 2014-05-03 19:42:38.000000000 +0200

       Datei: „n10.mp3“
    -Modifiziert: 2014-05-03 19:43:05.000000000 +0200
    +Modifiziert: 2014-05-03 19:43:04.000000000 +0200

       Datei: „n11.mp3“
    -Modifiziert: 2014-05-03 19:43:07.000000000 +0200
    +Modifiziert: 2014-05-03 19:43:06.000000000 +0200

      Datei: „n13.mp3“
    -Modifiziert: 2014-05-03 19:43:15.000000000 +0200
    +Modifiziert: 2014-05-03 19:43:14.000000000 +0200

       Datei: „n16.mp3“
    -Modifiziert: 2014-05-03 19:43:21.000000000 +0200
    +Modifiziert: 2014-05-03 19:43:20.000000000 +0200

       Datei: „n17.mp3“
    -Modifiziert: 2014-05-03 19:43:29.000000000 +0200
    +Modifiziert: 2014-05-03 19:43:28.000000000 +0200

       Datei: „n20.mp3“
    -Modifiziert: 2014-05-03 19:43:53.000000000 +0200
    +Modifiziert: 2014-05-03 19:43:52.000000000 +0200

       Datei: „n22.mp3“
    -Modifiziert: 2014-05-03 19:44:13.000000000 +0200
    +Modifiziert: 2014-05-03 19:44:12.000000000 +0200

       Datei: „n23.mp3“
    -Modifiziert: 2014-05-03 19:44:23.000000000 +0200
    +Modifiziert: 2014-05-03 19:44:22.000000000 +0200

       Datei: „n24.mp3“
    -Modifiziert: 2014-05-03 19:44:31.000000000 +0200
    +Modifiziert: 2014-05-03 19:44:30.000000000 +0200

       Datei: „n26.mp3“
    -Modifiziert: 2014-05-03 19:44:35.000000000 +0200
    +Modifiziert: 2014-05-03 19:44:34.000000000 +0200

       Datei: „n27.mp3“
    -Modifiziert: 2014-05-03 19:44:39.000000000 +0200
    +Modifiziert: 2014-05-03 19:44:38.000000000 +0200


> fixed [[done]] --[[Joey]]