Adding --chown=USER:GROUP alias for simple usecases of the
[rsync/rsync-patches.git] / drop-cache.diff
index c222427..8cdebe8 100644 (file)
@@ -56,7 +56,7 @@ You can get the latest edition of the patch from
 cheers
 tobi
 
-Changes: 
+Changes:
 
  2007-04-23
 
@@ -80,7 +80,7 @@ diff --git a/checksum.c b/checksum.c
 diff --git a/cleanup.c b/cleanup.c
 --- a/cleanup.c
 +++ b/cleanup.c
-@@ -47,7 +47,13 @@ void close_all(void)
+@@ -46,7 +46,13 @@ void close_all(void)
        int fd;
        int ret;
        STRUCT_STAT st;
@@ -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);
 +}