if the user passes a block size on the command line then don't adapt

the block size.
This commit is contained in:
Andrew Tridgell
1998-06-03 02:35:51 +00:00
parent 56cdbccb92
commit ddecf7060b

View File

@@ -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;