extern int am_server;
extern int am_daemon;
extern int protocol_version;
+extern int make_backups;
extern struct stats stats;
struct file_struct *file;
int phase = 0;
struct stats initial_stats;
+ int save_make_backups = make_backups;
int j;
if (verbose > 2)
write_int(f_out, -1);
if (verbose > 2)
rprintf(FINFO, "send_files phase=%d\n", phase);
+ /* For inplace: redo phase turns off the backup
+ * flag so that we do a regular inplace send. */
+ make_backups = 0;
continue;
}
break;
return;
}
- mbuf = st.st_size ? map_file(fd, st.st_size, s->blength) : NULL;
+ if (st.st_size) {
+ OFF_T map_size = MAX(s->blength * 3, MAX_MAP_SIZE);
+ mbuf = map_file(fd, st.st_size, map_size, s->blength);
+ } else
+ mbuf = NULL;
if (verbose > 2) {
rprintf(FINFO, "send_files mapped %s of size %.0f\n",
safe_fname(fname));
}
}
+ make_backups = save_make_backups;
if (verbose > 2)
rprintf(FINFO, "send files finished\n");