git-annex (7.20200205) UNRELEASED; urgency=medium
+ * fsck --from remote: Fix a concurrency bug that could make it incorrectly
+ detect that content in the remote is corrupt, and remove it, resulting in
+ data loss.
* When git-annex is built with a ssh that does not support ssh connection
caching, default annex.sshcaching to false, but let the user override it.
* Improve warning messages further when ssh connection caching cannot
{- git-annex command
-
- - Copyright 2010-2019 Joey Hess <id@joeyh.name>
+ - Copyright 2010-2020 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
]
ai = mkActionItem (key, afile)
withtmp a = do
+ -- Put it in the gitAnnexTmpObjectDir since that's on a
+ -- filesystem where object temp files are normally
+ -- stored. The pid prevents multiple fsck processes
+ -- contending over the same file. (Multiple threads cannot,
+ -- because OnlyActionOn is used.)
pid <- liftIO getPID
t <- fromRepo gitAnnexTmpObjectDir
createAnnexDirectory t
runFsck :: Incremental -> ActionItem -> Key -> Annex Bool -> CommandStart
runFsck inc ai key a = stopUnless (needFsck inc key) $
- starting "fsck" ai $ do
+ starting "fsck" (OnlyActionOn key ai) $ do
ok <- a
when ok $
recordFsckTime inc key
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2020-02-14T18:49:07Z"
+ content="""
+Ugh, I think this could potentially result in data loss. Not when using bup,
+but other special remotes.
+
+I've fixed it in git and will think about moving the date of the next
+release up.
+"""]]