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
|
* fsck: Fix recent reversion that made it say it was checksumming files
|
||||||
whose content is not present.
|
whose content is not present.
|
||||||
|
* Avoid the --fast option preventing checksumming in some cases it
|
||||||
|
was not supposed to.
|
||||||
* Typo fixes.
|
* Typo fixes.
|
||||||
Thanks, Yaroslav Halchenko
|
Thanks, Yaroslav Halchenko
|
||||||
|
|
||||||
|
|
|
@ -528,7 +528,10 @@ checkBackendRemote key remote ai localcopy =
|
||||||
checkBackendOr (badContentRemote remote localcopy) key localcopy ai
|
checkBackendOr (badContentRemote remote localcopy) key localcopy ai
|
||||||
|
|
||||||
checkBackendOr :: (Key -> Annex String) -> Key -> RawFilePath -> ActionItem -> Annex Bool
|
checkBackendOr :: (Key -> Annex String) -> Key -> RawFilePath -> ActionItem -> Annex Bool
|
||||||
checkBackendOr bad key file ai = do
|
checkBackendOr bad key file ai =
|
||||||
|
ifM (Annex.getRead Annex.fast)
|
||||||
|
( return True
|
||||||
|
, do
|
||||||
ok <- verifyKeyContent' key file
|
ok <- verifyKeyContent' key file
|
||||||
unless ok $ do
|
unless ok $ do
|
||||||
msg <- bad key
|
msg <- bad key
|
||||||
|
@ -536,6 +539,7 @@ checkBackendOr bad key file ai = do
|
||||||
<> ": Bad file content; "
|
<> ": Bad file content; "
|
||||||
<> UnquotedString msg
|
<> UnquotedString msg
|
||||||
return ok
|
return ok
|
||||||
|
)
|
||||||
|
|
||||||
{- Check, if there are InodeCaches recorded for a key, that one of them
|
{- Check, if there are InodeCaches recorded for a key, that one of them
|
||||||
- matches the object file. There are situations where the InodeCache
|
- matches the object file. There are situations where the InodeCache
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue