X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/f9df736a3e22f15307f9e304eb9069b06e94208f..0ef5abcbbb95298fa9faf1d3eb275a9e76e1d951:/drop-cache.diff diff --git a/drop-cache.diff b/drop-cache.diff index aca5d63..fcb15a9 100644 --- a/drop-cache.diff +++ b/drop-cache.diff @@ -56,7 +56,7 @@ You can get the latest edition of the patch from cheers tobi -Changes: +Changes: 2007-04-23 @@ -97,7 +97,7 @@ diff --git a/cleanup.c b/cleanup.c diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in -@@ -552,7 +552,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \ +@@ -554,7 +554,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \ strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \ setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \ strerror putenv iconv_open locale_charset nl_langinfo getxattr \ @@ -111,7 +111,7 @@ diff --git a/fileio.c b/fileio.c +++ b/fileio.c @@ -30,6 +30,12 @@ extern int sparse_files; static char last_byte; - static size_t sparse_seek = 0; + static OFF_T sparse_seek = 0; +#ifdef HAVE_POSIX_FADVISE64 +#define close(fd) fadv_close(fd) @@ -139,7 +139,7 @@ diff --git a/generator.c b/generator.c diff --git a/options.c b/options.c --- a/options.c +++ b/options.c -@@ -59,6 +59,7 @@ int preserve_uid = 0; +@@ -60,6 +60,7 @@ int preserve_uid = 0; int preserve_gid = 0; int preserve_times = 0; int update_only = 0; @@ -147,7 +147,7 @@ diff --git a/options.c b/options.c int cvs_exclude = 0; int dry_run = 0; int do_xfers = 1; -@@ -325,6 +326,9 @@ void usage(enum logcode F) +@@ -327,6 +328,9 @@ void usage(enum logcode F) rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n"); rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); rprintf(F," -u, --update skip files that are newer on the receiver\n"); @@ -157,7 +157,7 @@ diff --git a/options.c b/options.c rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n"); rprintf(F," --append append data onto shorter files\n"); rprintf(F," --append-verify like --append, but with old data in file checksum\n"); -@@ -531,6 +535,9 @@ static struct poptOption long_options[] = { +@@ -535,6 +539,9 @@ static struct poptOption long_options[] = { {"no-one-file-system",'x',POPT_ARG_VAL, &one_file_system, 0, 0, 0 }, {"no-x", 'x', POPT_ARG_VAL, &one_file_system, 0, 0, 0 }, {"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 }, @@ -167,7 +167,7 @@ diff --git a/options.c b/options.c {"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 }, {"ignore-non-existing",0,POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 }, {"ignore-existing", 0, POPT_ARG_NONE, &ignore_existing, 0, 0, 0 }, -@@ -1693,6 +1700,11 @@ void server_options(char **args, int *argc_p) +@@ -1720,6 +1727,11 @@ void server_options(char **args, int *argc_p) if (!am_sender) args[ac++] = "--sender"; @@ -182,7 +182,7 @@ diff --git a/options.c b/options.c diff --git a/receiver.c b/receiver.c --- a/receiver.c +++ b/receiver.c -@@ -62,6 +62,10 @@ static int phase = 0, redoing = 0; +@@ -63,6 +63,10 @@ static flist_ndx_list batch_redo_list; /* We're either updating the basis file or an identical copy: */ static int updating_basis_or_equiv; @@ -196,7 +196,7 @@ diff --git a/receiver.c b/receiver.c diff --git a/rsync.yo b/rsync.yo --- a/rsync.yo +++ b/rsync.yo -@@ -352,6 +352,7 @@ to the detailed description below for a complete description. verb( +@@ -356,6 +356,7 @@ to the detailed description below for a complete description. verb( --super receiver attempts super-user activities --fake-super store/recover privileged attrs using xattrs -S, --sparse handle sparse files efficiently @@ -204,7 +204,7 @@ diff --git a/rsync.yo b/rsync.yo -n, --dry-run perform a trial run with no changes made -W, --whole-file copy files whole (w/o delta-xfer algorithm) -x, --one-file-system don't cross filesystem boundaries -@@ -1036,6 +1037,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs" +@@ -1053,6 +1054,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs" filesystem. It doesn't seem to handle seeks over null regions correctly and ends up corrupting the files. @@ -251,7 +251,7 @@ diff --git a/util.c b/util.c extern int modify_window; extern int relative_paths; extern int human_readable; -@@ -41,6 +42,131 @@ char curr_dir[MAXPATHLEN]; +@@ -42,6 +43,131 @@ char curr_dir[MAXPATHLEN]; unsigned int curr_dir_len; int curr_dir_depth; /* This is only set for a sanitizing daemon. */ @@ -365,12 +365,12 @@ diff --git a/util.c b/util.c + fadv_fd_init_func(); + fadv_close_buffer_size += pos - fadv_fd_pos[fd]; + fadv_close_ring[fadv_close_ring_head] = newfd; -+ fadv_close_ring_head = (fadv_close_ring_head + 1) % fadv_max_fd; ++ fadv_close_ring_head = (fadv_close_ring_head + 1) % fadv_max_fd; + fadv_close_ring_size ++; + if (fadv_close_ring_size == fadv_max_fd || fadv_close_buffer_size > 1024*1024 ){ + /* it seems fastest to drop things 'in groups' */ + fadv_close_all(); -+ } ++ } + } + return close(fd); +}