e4b2a067e0
In Annex.Content, the object file was statted after pointer files were populated. But if annex.thin is set, once the pointer files are populated, the object file can potentially be modified via the hard link. So, it was possible, though seemingly very unlikely, for the inode of the modified object file to be cached. Command.Fix and Command.Fsck had similar problems, statting the work tree files after they were in place. Changed them to stat the temp file that gets moved into place. This does rely on .git/annex being on the same filesystem. If it's not, the cached inode will not be the same as the one that the temp file gets moved to. Result will be that git-annex will later need to do an expensive verification of the content of the worktree files. Note that the cross-filesystem move of the temp file already is a larger amount of extra work, so this seems acceptable. Sponsored-by: Luke Shumaker on Patreon |
||
---|---|---|
.. | ||
Keys | ||
Benchmark.hs | ||
ContentIdentifier.hs | ||
Export.hs | ||
Fsck.hs | ||
Handle.hs | ||
Init.hs | ||
Keys.hs | ||
Queue.hs | ||
Types.hs |