summaryrefslogtreecommitdiff
path: root/Locations.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-17 17:08:11 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-17 17:08:11 -0400
commit9abfef8c147e04ac5842933139814750ba2e9000 (patch)
tree75c5f16ba2e79c98e41eafaed9c9c54eea3490e1 /Locations.hs
parente6b87922f3ddc3e13b9ef7b724bb6b3e39c6875d (diff)
fsck: Multiple incremental fscks of different repos (some remote) can now be in progress at the same time in the same repo without it getting confused about which files have been checked for which remotes.
Diffstat (limited to 'Locations.hs')
-rw-r--r--Locations.hs31
1 files changed, 18 insertions, 13 deletions
diff --git a/Locations.hs b/Locations.hs
index 94c03cb91..41e0c4201 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -29,6 +29,8 @@ module Locations (
gitAnnexBadLocation,
gitAnnexUnusedLog,
gitAnnexFsckState,
+ gitAnnexFsckDb,
+ gitAnnexFsckDbLock,
gitAnnexFsckResultsLog,
gitAnnexScheduleState,
gitAnnexTransferDir,
@@ -57,8 +59,6 @@ module Locations (
gitAnnexSshDir,
gitAnnexRemotesDir,
gitAnnexAssistantDefaultDir,
- gitAnnexFsckDb,
- gitAnnexFsckDbLock,
isLinkToAnnex,
HashLevels(..),
hashDirMixed,
@@ -220,9 +220,22 @@ gitAnnexBadLocation key r = gitAnnexBadDir r </> keyFile key
gitAnnexUnusedLog :: FilePath -> Git.Repo -> FilePath
gitAnnexUnusedLog prefix r = gitAnnexDir r </> (prefix ++ "unused")
-{- .git/annex/fsckstate is used to store information about incremental fscks. -}
-gitAnnexFsckState :: Git.Repo -> FilePath
-gitAnnexFsckState r = gitAnnexDir r </> "fsckstate"
+{- .git/annex/fsck/uuid/ is used to store information about incremental
+ - fscks. -}
+gitAnnexFsckDir :: UUID -> Git.Repo -> FilePath
+gitAnnexFsckDir u r = gitAnnexDir r </> "fsck" </> fromUUID u
+
+{- used to store information about incremental fscks. -}
+gitAnnexFsckState :: UUID -> Git.Repo -> FilePath
+gitAnnexFsckState u r = gitAnnexFsckDir u r </> "state"
+
+{- Database used to record fsck info. -}
+gitAnnexFsckDb :: UUID -> Git.Repo -> FilePath
+gitAnnexFsckDb u r = gitAnnexFsckDir u r </> "fsck.db"
+
+{- Lock file for the fsck database. -}
+gitAnnexFsckDbLock :: UUID -> Git.Repo -> FilePath
+gitAnnexFsckDbLock u r = gitAnnexFsckDir u r </> "fsck.lck"
{- .git/annex/fsckresults/uuid is used to store results of git fscks -}
gitAnnexFsckResultsLog :: UUID -> Git.Repo -> FilePath
@@ -342,14 +355,6 @@ gitAnnexRemotesDir r = addTrailingPathSeparator $ gitAnnexDir r </> "remotes"
gitAnnexAssistantDefaultDir :: FilePath
gitAnnexAssistantDefaultDir = "annex"
-{- Database used to record fsck info. -}
-gitAnnexFsckDb :: Git.Repo -> FilePath
-gitAnnexFsckDb r = gitAnnexDir r </> "fsck.db"
-
-{- Lock file for the fsck database. -}
-gitAnnexFsckDbLock :: Git.Repo -> FilePath
-gitAnnexFsckDbLock r = gitAnnexDir r </> "fsck.dbl"
-
{- Checks a symlink target to see if it appears to point to annexed content.
-
- We only look at paths inside the .git directory, and not at the .git