diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-26 16:52:56 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-26 16:52:56 -0400 |
commit | 8c6099d73c86f8803f08c47fe224cf8398cfd6c2 (patch) | |
tree | 7d23c487f323020f4c56a6957c58efe82e839570 /Assistant | |
parent | b03b8e8cd7977d9a059efe8226b30e90f53be3e6 (diff) |
Put non-object tmp files in .git/annex/misctmp, leaving .git/annex/tmp for only partially transferred objects.
This allows eg, putting .git/annex/tmp on a ram disk, if the disk IO
of temp object files is too annoying (and if you don't want to keep
partially transferred objects across reboots).
.git/annex/misctmp must be on the same filesystem as the git work tree,
since files are moved to there in a way that will not work cross-device,
as well as symlinked into there.
I first wanted to put the tmp objects in .git/annex/objects/tmp, but
that would pose transition problems on upgrade when partially transferred
objects existed.
git annex info does not currently show the size of .git/annex/misctemp,
since it should stay small. It would also be ok to make something clean it
out, periodically.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Threads/Committer.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/TransferPoller.hs | 2 | ||||
-rw-r--r-- | Assistant/XMPP/Git.hs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index e8d17b13f..cb98b017f 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -448,7 +448,7 @@ safeToAdd havelsof delayadd pending inprocess = do let segments = segmentXargs $ map keyFilename keysources concat <$> forM segments (\fs -> Lsof.query $ "--" : fs) , do - tmpdir <- fromRepo gitAnnexTmpDir + tmpdir <- fromRepo gitAnnexTmpMiscDir liftIO $ Lsof.queryDir tmpdir ) diff --git a/Assistant/Threads/TransferPoller.hs b/Assistant/Threads/TransferPoller.hs index 68075cac8..71bfe3676 100644 --- a/Assistant/Threads/TransferPoller.hs +++ b/Assistant/Threads/TransferPoller.hs @@ -35,7 +35,7 @@ transferPollerThread = namedThread "TransferPoller" $ do {- Downloads are polled by checking the size of the - temp file being used for the transfer. -} | transferDirection t == Download = do - let f = gitAnnexTmpLocation (transferKey t) g + let f = gitAnnexTmpObjectLocation (transferKey t) g sz <- liftIO $ catchMaybeIO $ fromIntegral . fileSize <$> getFileStatus f newsize t info sz diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs index 22c3a125e..ab34dce1e 100644 --- a/Assistant/XMPP/Git.hs +++ b/Assistant/XMPP/Git.hs @@ -187,7 +187,7 @@ xmppPush cid gitpush = do v <- liftIO $ getEnv "GIT_ANNEX_TMP_DIR" case v of Nothing -> do - tmp <- liftAnnex $ fromRepo gitAnnexTmpDir + tmp <- liftAnnex $ fromRepo gitAnnexTmpMiscDir return $ tmp </> "xmppgit" Just d -> return $ d </> "xmppgit" |