all: Implement variable sized blocks (fixes #4807)

This commit is contained in:
Jakob Borg authored and Audrius Butkevicius committed 2018-04-16 19:08:50 +01:00
1 parent 01aef75c96
commit 19c7cd99f5
27 files changed
+536 -293

No files matched your search

+2 -2
View File
@@ -68,8 +68,8 @@ func main() {
}
blockSize := int(fi.Size())
if *standardBlocks || blockSize < protocol.BlockSize {
blockSize = protocol.BlockSize
if *standardBlocks || blockSize < protocol.MinBlockSize {
blockSize = protocol.BlockSize(fi.Size())
}
bs, err := scanner.Blocks(context.TODO(), fd, blockSize, fi.Size(), nil, true)
if err != nil {