Adding --chown=USER:GROUP alias for simple usecases of the
[rsync/rsync-patches.git] / drop-cache.diff
index 79177e7..8cdebe8 100644 (file)
@@ -56,7 +56,7 @@ You can get the latest edition of the patch from
 cheers
 tobi
 
 cheers
 tobi
 
-Changes: 
+Changes:
 
  2007-04-23
 
 
  2007-04-23
 
@@ -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
   -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
-@@ -1043,6 +1044,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1049,6 +1050,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.
  
@@ -251,7 +251,7 @@ diff --git a/util.c b/util.c
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
  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. */
  
  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_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();
 +              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);
 +}
 +      }
 +      return close(fd);
 +}