Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Fri, 9 Nov 2007 04:12:58 +0000 (04:12 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 9 Nov 2007 04:12:58 +0000 (04:12 +0000)
drop-cache.diff
preallocate.diff

index 1d57ecc..e0a3558 100644 (file)
@@ -94,7 +94,7 @@ Changes:
                if ((ret = do_fstat(fd, &st)) == 0) {
 --- old/configure.in
 +++ new/configure.in
                if ((ret = do_fstat(fd, &st)) == 0) {
 --- old/configure.in
 +++ new/configure.in
-@@ -561,7 +561,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
+@@ -547,7 +547,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
      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 \
      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 \
@@ -120,7 +120,7 @@ Changes:
        int ret;
 --- old/generator.c
 +++ new/generator.c
        int ret;
 --- old/generator.c
 +++ new/generator.c
-@@ -114,6 +114,10 @@ static int need_retouch_dir_times;
+@@ -112,6 +112,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;
  
@@ -177,7 +177,7 @@ Changes:
 +++ new/receiver.c
 @@ -62,6 +62,10 @@ static int phase = 0, redoing = 0;
  /* We're either updating the basis file or an identical copy: */
 +++ new/receiver.c
 @@ -62,6 +62,10 @@ static int phase = 0, redoing = 0;
  /* We're either updating the basis file or an identical copy: */
- static int updating_basis;
+ static int updating_basis_or_equiv;
  
 +#ifdef HAVE_POSIX_FADVISE64
 +#define close(fd) fadv_close(fd)
  
 +#ifdef HAVE_POSIX_FADVISE64
 +#define close(fd) fadv_close(fd)
@@ -193,10 +193,10 @@ Changes:
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
 +     --drop-cache            tell OS to drop caching of file data
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
 +     --drop-cache            tell OS to drop caching of file data
-  -n, --dry-run               show what would have been transferred
+  -n, --dry-run               perform a trial run with no changes made
   -W, --whole-file            copy files whole (without rsync algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
   -W, --whole-file            copy files whole (without rsync algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
-@@ -1014,6 +1015,10 @@ NOTE: Don't use this option when the des
+@@ -1022,6 +1023,10 @@ NOTE: Don't use this option when the des
  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.
  
@@ -204,9 +204,9 @@ Changes:
 +prevents rsync from filling up the filesystem cache.  This can sometimes help
 +to make a system perform better by keeping non-rsync files in the disk cache.
 +
 +prevents rsync from filling up the filesystem cache.  This can sometimes help
 +to make a system perform better by keeping non-rsync files in the disk cache.
 +
- dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
- instead it will just report the actions it would have taken.
+ dit(bf(-n, --dry-run)) This makes rsync perform a trial run that doesn't
+ make any changes (and produces mostly the same output as a real run).  It
+ is most commonly used in combination with the bf(-v, --verbose) and/or
 --- old/sender.c
 +++ new/sender.c
 @@ -46,6 +46,10 @@ extern int write_batch;
 --- old/sender.c
 +++ new/sender.c
 @@ -46,6 +46,10 @@ extern int write_batch;
index 6a3192d..476b4da 100644 (file)
@@ -11,7 +11,7 @@ To use this patch, run these commands for a successful build:
 
 --- old/configure.in
 +++ new/configure.in
 
 --- old/configure.in
 +++ new/configure.in
-@@ -561,7 +561,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
+@@ -547,7 +547,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
      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 \
      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 \
@@ -66,7 +66,7 @@ To use this patch, run these commands for a successful build:
 +#ifdef SUPPORT_PREALLOCATION
 +  rprintf(F,"     --preallocate           posix_fallocate dest files before writing them\n");
 +#endif
 +#ifdef SUPPORT_PREALLOCATION
 +  rprintf(F,"     --preallocate           posix_fallocate dest files before writing them\n");
 +#endif
-   rprintf(F," -n, --dry-run               show what would have been transferred\n");
+   rprintf(F," -n, --dry-run               perform a trial run with no changes made\n");
    rprintf(F," -W, --whole-file            copy files whole (without rsync algorithm)\n");
    rprintf(F," -x, --one-file-system       don't cross filesystem boundaries\n");
 @@ -528,6 +536,7 @@ static struct poptOption long_options[] 
    rprintf(F," -W, --whole-file            copy files whole (without rsync algorithm)\n");
    rprintf(F," -x, --one-file-system       don't cross filesystem boundaries\n");
 @@ -528,6 +536,7 @@ static struct poptOption long_options[] 
@@ -113,7 +113,7 @@ To use this patch, run these commands for a successful build:
  extern int keep_partial;
  extern int checksum_seed;
  extern int inplace;
  extern int keep_partial;
  extern int checksum_seed;
  extern int inplace;
-@@ -138,6 +139,19 @@ static int receive_data(int f_in, char *
+@@ -175,6 +176,19 @@ static int receive_data(int f_in, char *
        int32 i;
        char *map = NULL;
  
        int32 i;
        char *map = NULL;
  
@@ -133,7 +133,7 @@ To use this patch, run these commands for a successful build:
        read_sum_head(f_in, &sum);
  
        if (fd_r >= 0 && size_r > 0) {
        read_sum_head(f_in, &sum);
  
        if (fd_r >= 0 && size_r > 0) {
-@@ -247,8 +261,18 @@ static int receive_data(int f_in, char *
+@@ -284,8 +298,18 @@ static int receive_data(int f_in, char *
                goto report_write_error;
  
  #ifdef HAVE_FTRUNCATE
                goto report_write_error;
  
  #ifdef HAVE_FTRUNCATE
@@ -156,7 +156,7 @@ To use this patch, run these commands for a successful build:
        if (do_progress)
 --- old/rsync.h
 +++ new/rsync.h
        if (do_progress)
 --- old/rsync.h
 +++ new/rsync.h
-@@ -568,6 +568,10 @@ struct ht_int64_node {
+@@ -590,6 +590,10 @@ struct ht_int64_node {
  #define ACLS_NEED_MASK 1
  #endif
  
  #define ACLS_NEED_MASK 1
  #endif
  
@@ -174,10 +174,10 @@ To use this patch, run these commands for a successful build:
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
 +     --preallocate           posix_fallocate dest files before writing
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
 +     --preallocate           posix_fallocate dest files before writing
-  -n, --dry-run               show what would have been transferred
+  -n, --dry-run               perform a trial run with no changes made
   -W, --whole-file            copy files whole (without rsync algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
   -W, --whole-file            copy files whole (without rsync algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
-@@ -1014,6 +1015,19 @@ NOTE: Don't use this option when the des
+@@ -1022,6 +1023,19 @@ NOTE: Don't use this option when the des
  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.
  
@@ -194,9 +194,9 @@ To use this patch, run these commands for a successful build:
 +fragments to one.  However, on Linux, this option appears to just waste
 +disk I/O.
 +
 +fragments to one.  However, on Linux, this option appears to just waste
 +disk I/O.
 +
- dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
- instead it will just report the actions it would have taken.
+ dit(bf(-n, --dry-run)) This makes rsync perform a trial run that doesn't
+ make any changes (and produces mostly the same output as a real run).  It
+ is most commonly used in combination with the bf(-v, --verbose) and/or
 --- old/t_stub.c
 +++ new/t_stub.c
 @@ -22,6 +22,7 @@
 --- old/t_stub.c
 +++ new/t_stub.c
 @@ -22,6 +22,7 @@
@@ -217,8 +217,8 @@ To use this patch, run these commands for a successful build:
  extern int module_id;
  extern int modify_window;
  extern int relative_paths;
  extern int module_id;
  extern int modify_window;
  extern int relative_paths;
-@@ -271,6 +272,10 @@ int copy_file(const char *source, const 
-       int ofd;
+@@ -272,6 +273,10 @@ int copy_file(const char *source, const 
+       int ifd;
        char buf[1024 * 8];
        int len;   /* Number of bytes read into `buf'. */
 +#ifdef SUPPORT_PREALLOCATION
        char buf[1024 * 8];
        int len;   /* Number of bytes read into `buf'. */
 +#ifdef SUPPORT_PREALLOCATION
@@ -228,8 +228,8 @@ To use this patch, run these commands for a successful build:
  
        if ((ifd = do_open(source, O_RDONLY, 0)) < 0) {
                rsyserr(FERROR, errno, "open %s", full_fname(source));
  
        if ((ifd = do_open(source, O_RDONLY, 0)) < 0) {
                rsyserr(FERROR, errno, "open %s", full_fname(source));
-@@ -290,7 +295,27 @@ int copy_file(const char *source, const 
-               return -1;
+@@ -293,7 +298,27 @@ int copy_file(const char *source, const 
+               }
        }
  
 +#ifdef SUPPORT_PREALLOCATION
        }
  
 +#ifdef SUPPORT_PREALLOCATION
@@ -256,7 +256,7 @@ To use this patch, run these commands for a successful build:
                if (full_write(ofd, buf, len) < 0) {
                        rsyserr(FERROR, errno, "write %s", full_fname(dest));
                        close(ifd);
                if (full_write(ofd, buf, len) < 0) {
                        rsyserr(FERROR, errno, "write %s", full_fname(dest));
                        close(ifd);
-@@ -311,6 +336,16 @@ int copy_file(const char *source, const 
+@@ -314,6 +339,16 @@ int copy_file(const char *source, const 
                        full_fname(source));
        }
  
                        full_fname(source));
        }