mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-01-28 08:48:39 -05:00
if the user passes a block size on the command line then don't adapt
the block size.
This commit is contained in:
6
rsync.c
6
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;
|
||||
|
||||
Reference in New Issue
Block a user