diff --git a/src/restic/readerat.go b/src/restic/readerat.go index 320d032a4..a57974473 100644 --- a/src/restic/readerat.go +++ b/src/restic/readerat.go @@ -2,6 +2,7 @@ package restic import ( "io" + "restic/debug" ) type backendReaderAt struct { @@ -20,6 +21,7 @@ func ReaderAt(be Backend, h Handle) io.ReaderAt { // ReadAt reads from the backend handle h at the given position. func ReadAt(be Backend, h Handle, offset int64, p []byte) (n int, err error) { + debug.Log("ReadAt(%v) at %v, len %v", h, offset, len(p)) rd, err := be.Load(h, len(p), offset) if err != nil { return 0, err @@ -31,5 +33,7 @@ func ReadAt(be Backend, h Handle, offset int64, p []byte) (n int, err error) { err = e } + debug.Log("ReadAt(%v) ReadFull returned %v bytes", h, n) + return n, err } diff --git a/src/restic/repository/repository.go b/src/restic/repository/repository.go index 3545f42de..8344271d6 100644 --- a/src/restic/repository/repository.go +++ b/src/restic/repository/repository.go @@ -520,7 +520,7 @@ func (r *Repository) Close() error { // be large enough to hold the encrypted blob, since it is used as scratch // space. func (r *Repository) LoadBlob(t restic.BlobType, id restic.ID, buf []byte) (int, error) { - debug.Log("load blob %v into buf %p", id.Str(), buf) + debug.Log("load blob %v into buf (len %v, cap %v)", id.Str(), len(buf), cap(buf)) size, err := r.idx.LookupSize(id, t) if err != nil { return 0, err