summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-08-03 08:05:27 +0000
committerWayne Davison <wayned@samba.org>2004-08-03 08:05:27 +0000
commit96d910c770b9443e204e183d3f3a8720c346a79c (patch)
treec6ff0677f96ee6c9c7dae75b8ffcf7ac62b90927 /receiver.c
parent7560c17adc73f1f1407f9453c00ddef185d1aad3 (diff)
downloadrsync-96d910c770b9443e204e183d3f3a8720c346a79c.tar.gz
rsync-96d910c770b9443e204e183d3f3a8720c346a79c.tar.bz2
rsync-96d910c770b9443e204e183d3f3a8720c346a79c.zip
Call map_file() with its new args, including a suggested window
size.
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/receiver.c b/receiver.c
index a62bc061..9e40fcbf 100644
--- a/receiver.c
+++ b/receiver.c
@@ -222,7 +222,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
read_sum_head(f_in, &sum);
if (fd_r >= 0 && size_r > 0) {
- mapbuf = map_file(fd_r, size_r, sum.blength);
+ OFF_T map_size = MAX(sum.blength * 2, 16*1024);
+ mapbuf = map_file(fd_r, size_r, map_size, sum.blength);
if (verbose > 2) {
rprintf(FINFO, "recv mapped %s of size %.0f\n",
safe_fname(fname_r), (double)size_r);