The patches for 3.0.0pre10.
[rsync/rsync-patches.git] / drop-cache.diff
index d3448df..6c7f277 100644 (file)
@@ -104,8 +104,8 @@ diff --git a/configure.in b/configure.in
 -    extattr_get_link sigaction sigprocmask setattrlist)
 +    extattr_get_link sigaction sigprocmask setattrlist posix_fadvise64)
  
 -    extattr_get_link sigaction sigprocmask setattrlist)
 +    extattr_get_link sigaction sigprocmask setattrlist posix_fadvise64)
  
- AC_CHECK_FUNCS(getpgrp tcgetpgrp)
- if test $ac_cv_func_getpgrp = yes; then
+ dnl cygwin iconv.h defines iconv_open as libiconv_open
+ if test x"$ac_cv_func_iconv_open" != x"yes"; then
 diff --git a/fileio.c b/fileio.c
 --- a/fileio.c
 +++ b/fileio.c
 diff --git a/fileio.c b/fileio.c
 --- a/fileio.c
 +++ b/fileio.c
@@ -125,7 +125,7 @@ diff --git a/fileio.c b/fileio.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -112,6 +112,10 @@ static int need_retouch_dir_times;
+@@ -115,6 +115,10 @@ static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
  static const char *solo_file = NULL;
  
  static int need_retouch_dir_perms;
  static const char *solo_file = NULL;
  
@@ -134,12 +134,12 @@ diff --git a/generator.c b/generator.c
 +#endif
 +
  /* For calling delete_item() and delete_dir_contents(). */
 +#endif
 +
  /* For calling delete_item() and delete_dir_contents(). */
- #define DEL_RECURSE           (1<<1) /* recurse */
- #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
+ #define DEL_OWNED_BY_US       (1<<0) /* file/dir has our uid */
+ #define DEL_RECURSE           (1<<1) /* if dir, delete all contents */
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -58,6 +58,7 @@ int preserve_uid = 0;
+@@ -59,6 +59,7 @@ int preserve_uid = 0;
  int preserve_gid = 0;
  int preserve_times = 0;
  int update_only = 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;
  int cvs_exclude = 0;
  int dry_run = 0;
  int do_xfers = 1;
-@@ -320,6 +321,9 @@ void usage(enum logcode F)
+@@ -325,6 +326,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");
    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,9 +157,9 @@ 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");
    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");
-@@ -524,6 +528,9 @@ static struct poptOption long_options[] = {
-   {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
-   {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
+@@ -531,6 +535,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 },
 +#ifdef HAVE_POSIX_FADVISE64
 +  {"drop-cache",       0,  POPT_ARG_NONE,   &drop_cache, 0, 0, 0 },
    {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
 +#ifdef HAVE_POSIX_FADVISE64
 +  {"drop-cache",       0,  POPT_ARG_NONE,   &drop_cache, 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 },
    {"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 },
-@@ -1662,6 +1669,11 @@ void server_options(char **args, int *argc_p)
+@@ -1693,6 +1700,11 @@ void server_options(char **args, int *argc_p)
        if (!am_sender)
                args[ac++] = "--sender";
  
        if (!am_sender)
                args[ac++] = "--sender";
  
@@ -202,9 +202,9 @@ diff --git a/rsync.yo b/rsync.yo
   -S, --sparse                handle sparse files efficiently
 +     --drop-cache            tell OS to drop caching of file data
   -n, --dry-run               perform a trial run with no changes made
   -S, --sparse                handle sparse files efficiently
 +     --drop-cache            tell OS to drop caching of file data
   -n, --dry-run               perform a trial run with no changes made
-  -W, --whole-file            copy files whole (without rsync algorithm)
+  -W, --whole-file            copy files whole (w/o delta-xfer algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
   -x, --one-file-system       don't cross filesystem boundaries
-@@ -1023,6 +1024,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1036,6 +1037,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.
  
  filesystem. It doesn't seem to handle seeks over null regions
  correctly and ends up corrupting the files.
  
@@ -238,8 +238,8 @@ diff --git a/t_unsafe.c b/t_unsafe.c
  int verbose = 0;
 +int drop_cache = 0;
  int preserve_perms = 0;
  int verbose = 0;
 +int drop_cache = 0;
  int preserve_perms = 0;
+ int preserve_executability = 0;
  
  
- int
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c