From: Andrew Tridgell Date: Wed, 3 Jun 1998 02:35:51 +0000 (+0000) Subject: if the user passes a block size on the command line then don't adapt X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/ddecf7060b2b0316d29a2d4e13d2a4160e1badd7 if the user passes a block size on the command line then don't adapt the block size. --- diff --git a/rsync.c b/rsync.c index 72c7ce9c..beb3d37f 100644 --- a/rsync.c +++ b/rsync.c @@ -356,7 +356,11 @@ static int skip_file(char *fname, /* use a larger block size for really big files */ int adapt_block_size(struct file_struct *file, int bsize) { - int ret = file->length / (10000); /* rough heuristic */ + int ret; + + if (bsize != BLOCK_SIZE) return bsize; + + 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;