From: Andrew Tridgell Date: Mon, 23 Mar 1998 06:26:08 +0000 (+0000) Subject: don't adapt the block size to above half the chunk size X-Git-Tag: v1.7.0~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1aa71c8d5784c131688c57ff8d3c683a02f43d0c;p=thirdparty%2Frsync.git don't adapt the block size to above half the chunk size --- diff --git a/rsync.c b/rsync.c index 59d74226..22e4dcdc 100644 --- a/rsync.c +++ b/rsync.c @@ -283,6 +283,7 @@ int adapt_block_size(struct file_struct *file, int bsize) int ret = file->length / (10000); /* rough heuristic */ ret = ret & ~15; /* multiple of 16 */ if (ret < bsize) ret = bsize; + if (ret > CHUNK_SIZE/2) ret = CHUNK_SIZE/2; return ret; }