fuse: refactor and add tests for fuse.file

This commit is contained in:
Alexander Neumann
2015-07-26 16:43:42 +02:00
parent 55ddd5317d
commit bd746a0425
3 changed files with 179 additions and 9 deletions

View File

@@ -201,6 +201,11 @@ func (r *Repository) LoadJSONPack(t pack.BlobType, id backend.ID, item interface
return nil
}
// LookupBlobSize returns the size of blob id.
func (r *Repository) LookupBlobSize(id backend.ID) (uint, error) {
return r.Index().LookupSize(id)
}
const minPackSize = 4 * chunker.MiB
const maxPackSize = 16 * chunker.MiB
const maxPackers = 200