Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
56cdbcc
)
if the user passes a block size on the command line then don't adapt
author
Andrew Tridgell
<tridge@samba.org>
Wed, 3 Jun 1998 02:35:51 +0000
(
02:35
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 3 Jun 1998 02:35:51 +0000
(
02:35
+0000)
the block size.
rsync.c
patch
|
blob
|
blame
|
history
diff --git
a/rsync.c
b/rsync.c
index
72c7ce9
..
beb3d37
100644
(file)
--- 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;