fsck --from remote --fast

Avoids expensive file transfers, at the expense of checking file size
and/or contents.

Required some reworking of the remote code.
This commit is contained in:
Joey Hess 2012-01-20 13:23:11 -04:00
parent e96726caa3
commit 61dbad505d
16 changed files with 109 additions and 47 deletions

View file

@ -43,8 +43,10 @@ data RemoteA a = Remote {
cost :: Int,
-- Transfers a key to the remote.
storeKey :: Key -> a Bool,
-- retrieves a key's contents to a file (possibly a tmp file)
retrieveKeyFile :: Key -> Bool -> FilePath -> a Bool,
-- retrieves a key's contents to a file
retrieveKeyFile :: Key -> FilePath -> a Bool,
-- retrieves a key's contents to a tmp file, if it can be done cheaply
retrieveKeyFileCheap :: Key -> FilePath -> a Bool,
-- removes a key's contents
removeKey :: Key -> a Bool,
-- Checks if a key is present in the remote; if the remote