Avoid the --fast option preventing checksumming in some cases it was not supposed to
fsck --fast was intended to disable checksumming, but checksumming is done after transfers too. Due to the check being in the non-incremental path, it would only affect non-incremental checksumming during a transfer, and I'm not 100% sure that it was a problem. Also, when using an external backend that does checksumming, fsck --fast didn't disable it and now does.
This commit is contained in:
parent
8844372c23
commit
0281f7f23e
2 changed files with 14 additions and 8 deletions
|
@ -2,6 +2,8 @@ git-annex (10.20240431) UNRELEASED; urgency=medium
|
|||
|
||||
* fsck: Fix recent reversion that made it say it was checksumming files
|
||||
whose content is not present.
|
||||
* Avoid the --fast option preventing checksumming in some cases it
|
||||
was not supposed to.
|
||||
* Typo fixes.
|
||||
Thanks, Yaroslav Halchenko
|
||||
|
||||
|
|
|
@ -528,14 +528,18 @@ checkBackendRemote key remote ai localcopy =
|
|||
checkBackendOr (badContentRemote remote localcopy) key localcopy ai
|
||||
|
||||
checkBackendOr :: (Key -> Annex String) -> Key -> RawFilePath -> ActionItem -> Annex Bool
|
||||
checkBackendOr bad key file ai = do
|
||||
ok <- verifyKeyContent' key file
|
||||
unless ok $ do
|
||||
msg <- bad key
|
||||
warning $ actionItemDesc ai
|
||||
<> ": Bad file content; "
|
||||
<> UnquotedString msg
|
||||
return ok
|
||||
checkBackendOr bad key file ai =
|
||||
ifM (Annex.getRead Annex.fast)
|
||||
( return True
|
||||
, do
|
||||
ok <- verifyKeyContent' key file
|
||||
unless ok $ do
|
||||
msg <- bad key
|
||||
warning $ actionItemDesc ai
|
||||
<> ": Bad file content; "
|
||||
<> UnquotedString msg
|
||||
return ok
|
||||
)
|
||||
|
||||
{- Check, if there are InodeCaches recorded for a key, that one of them
|
||||
- matches the object file. There are situations where the InodeCache
|
||||
|
|
Loading…
Add table
Reference in a new issue