fsck: Fix a reversion in direct mode fsck of a file that is present when the location log thinks it is not. Reversion introduced in version 5.20151208.
This commit is contained in:
parent
ff2f6ed241
commit
5642daa651
4 changed files with 27 additions and 2 deletions
|
@ -12,6 +12,9 @@ git-annex (6.20160614) UNRELEASED; urgency=medium
|
||||||
* Remove the EKG build flag, since Gentoo for some reason decided to
|
* Remove the EKG build flag, since Gentoo for some reason decided to
|
||||||
enable this flag, depsite it not being intended for production use and
|
enable this flag, depsite it not being intended for production use and
|
||||||
so disabled by default.
|
so disabled by default.
|
||||||
|
* fsck: Fix a reversion in direct mode fsck of a file that is
|
||||||
|
present when the location log thinks it is not. Reversion introduced
|
||||||
|
in version 5.20151208.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Mon, 13 Jun 2016 21:52:24 -0400
|
-- Joey Hess <id@joeyh.name> Mon, 13 Jun 2016 21:52:24 -0400
|
||||||
|
|
||||||
|
|
|
@ -214,11 +214,11 @@ fixLink key file = do
|
||||||
- in this repository only. -}
|
- in this repository only. -}
|
||||||
verifyLocationLog :: Key -> KeyStatus -> String -> Annex Bool
|
verifyLocationLog :: Key -> KeyStatus -> String -> Annex Bool
|
||||||
verifyLocationLog key keystatus desc = do
|
verifyLocationLog key keystatus desc = do
|
||||||
|
direct <- isDirect
|
||||||
obj <- calcRepo $ gitAnnexLocation key
|
obj <- calcRepo $ gitAnnexLocation key
|
||||||
present <- if isKeyUnlocked keystatus
|
present <- if not direct && isKeyUnlocked keystatus
|
||||||
then liftIO (doesFileExist obj)
|
then liftIO (doesFileExist obj)
|
||||||
else inAnnex key
|
else inAnnex key
|
||||||
direct <- isDirect
|
|
||||||
u <- getUUID
|
u <- getUUID
|
||||||
|
|
||||||
{- Since we're checking that a key's object file is present, throw
|
{- Since we're checking that a key's object file is present, throw
|
||||||
|
|
|
@ -31,3 +31,5 @@ As for how such files happen in the first place, I've no idea myself. (For what
|
||||||
### What version of git-annex are you using? On what operating system?
|
### What version of git-annex are you using? On what operating system?
|
||||||
|
|
||||||
Arch's community/git-annex 6.20160511
|
Arch's community/git-annex 6.20160511
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2016-07-12T17:29:55Z"
|
||||||
|
content="""
|
||||||
|
Bug sumitter, it would be good if you could find a way to reproduce
|
||||||
|
the location log getting out of sync with reality. While `git annex fsck`
|
||||||
|
is there to fix such a diverenge, it should not happen in the first place
|
||||||
|
in normal operation.
|
||||||
|
|
||||||
|
Reproduced by using `setpresentkey` to make the log not think
|
||||||
|
the file content is locally available. The file was available, and had
|
||||||
|
the right content, but fsck complains as shown.
|
||||||
|
|
||||||
|
Ok, found the bug, it was treating the file as an unlocked file,
|
||||||
|
but that meant it looked for the object file. That's the wrong
|
||||||
|
thing to do in direct mode. This reversion was introduced in
|
||||||
|
[[!commit e7183d83d367bb52f502266b11b5b6dff683279e]], so versions
|
||||||
|
before 5.20151208 were ok. Fixing..
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue