Fix bogus failure of fsck --fast.
This commit is contained in:
parent
69dcbe1cf3
commit
cfbeb1e7b7
4 changed files with 16 additions and 10 deletions
|
@ -112,14 +112,15 @@ performRemote key file backend numcopies remote =
|
||||||
dispatch (Left err) = do
|
dispatch (Left err) = do
|
||||||
showNote err
|
showNote err
|
||||||
return False
|
return False
|
||||||
dispatch (Right True) = withtmp $ \tmpfile ->
|
dispatch (Right True) = withtmp $ \tmpfile -> do
|
||||||
ifM (getfile tmpfile)
|
r <- getfile tmpfile
|
||||||
( go True (Just tmpfile)
|
case r of
|
||||||
, do
|
Nothing -> go True Nothing
|
||||||
|
Just True -> go True (Just tmpfile)
|
||||||
|
Just False -> do
|
||||||
warning "failed to download file from remote"
|
warning "failed to download file from remote"
|
||||||
void $ go True Nothing
|
void $ go True Nothing
|
||||||
return False
|
return False
|
||||||
)
|
|
||||||
dispatch (Right False) = go False Nothing
|
dispatch (Right False) = go False Nothing
|
||||||
go present localcopy = check
|
go present localcopy = check
|
||||||
[ verifyLocationLogRemote key file remote present
|
[ verifyLocationLogRemote key file remote present
|
||||||
|
@ -137,13 +138,14 @@ performRemote key file backend numcopies remote =
|
||||||
cleanup `after` a tmp
|
cleanup `after` a tmp
|
||||||
getfile tmp = ifM (checkDiskSpace (Just tmp) key 0)
|
getfile tmp = ifM (checkDiskSpace (Just tmp) key 0)
|
||||||
( ifM (Remote.retrieveKeyFileCheap remote key tmp)
|
( ifM (Remote.retrieveKeyFileCheap remote key tmp)
|
||||||
( return True
|
( return (Just True)
|
||||||
, ifM (Annex.getState Annex.fast)
|
, ifM (Annex.getState Annex.fast)
|
||||||
( return False
|
( return Nothing
|
||||||
, Remote.retrieveKeyFile remote key Nothing tmp dummymeter
|
, Just <$>
|
||||||
|
Remote.retrieveKeyFile remote key Nothing tmp dummymeter
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
, return False
|
, return (Just False)
|
||||||
)
|
)
|
||||||
dummymeter _ = noop
|
dummymeter _ = noop
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
|
||||||
readBytes $ \encb ->
|
readBytes $ \encb ->
|
||||||
storer (enck k) (ByteContent encb) p
|
storer (enck k) (ByteContent encb) p
|
||||||
|
|
||||||
-- call retrieve-r to get chunks; decrypt them; stream to dest file
|
-- call retriever to get chunks; decrypt them; stream to dest file
|
||||||
retrieveKeyFileGen k dest p enc =
|
retrieveKeyFileGen k dest p enc =
|
||||||
safely $ prepareretriever k $ safely . go
|
safely $ prepareretriever k $ safely . go
|
||||||
where
|
where
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -7,6 +7,7 @@ git-annex (5.20150421) UNRELEASED; urgency=medium
|
||||||
(endpoint, port, storage class)
|
(endpoint, port, storage class)
|
||||||
* S3: git annex enableremote will not create a bucket name, which
|
* S3: git annex enableremote will not create a bucket name, which
|
||||||
failed since the bucket already exists.
|
failed since the bucket already exists.
|
||||||
|
* Fix bogus failure of fsck --fast.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Tue, 21 Apr 2015 15:54:10 -0400
|
-- Joey Hess <id@joeyh.name> Tue, 21 Apr 2015 15:54:10 -0400
|
||||||
|
|
||||||
|
|
|
@ -25,3 +25,6 @@ failed
|
||||||
|
|
||||||
|
|
||||||
while ``git annex fsck -f S3remote`` works fine. But, to check for the presence of a file (which is my understanding of what ``--fast`` is for here), it shouldn't be necessary to download the file.
|
while ``git annex fsck -f S3remote`` works fine. But, to check for the presence of a file (which is my understanding of what ``--fast`` is for here), it shouldn't be necessary to download the file.
|
||||||
|
|
||||||
|
> [[fixed|done]]; it was not supposed to fail at all in this case, and
|
||||||
|
> won't anymore. --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue