+++ new/fileio.c
@@ -30,6 +30,12 @@ extern int sparse_files;
static char last_byte;
- static int last_sparse;
+ static size_t sparse_seek = 0;
+#ifdef HAVE_POSIX_FADVISE64
+#define close(fd) fadv_close(fd)
+
int sparse_end(int f)
{
- if (last_sparse) {
+ int ret;
--- old/generator.c
+++ new/generator.c
-@@ -115,6 +115,10 @@ static int dir_tweaking;
- static int need_retouch_dir_times;
+@@ -114,6 +114,10 @@ static int need_retouch_dir_times;
+ static int need_retouch_dir_perms;
static const char *solo_file = NULL;
+#ifdef HAVE_POSIX_FADVISE64
#define DEL_DIR_IS_EMPTY (1<<2) /* internal delete_FUNCTIONS use only */
--- old/options.c
+++ new/options.c
-@@ -57,6 +57,7 @@ int preserve_gid = 0;
+@@ -58,6 +58,7 @@ int preserve_uid = 0;
+ int preserve_gid = 0;
int preserve_times = 0;
- int omit_dir_times = 0;
int update_only = 0;
+int drop_cache = 0;
int cvs_exclude = 0;
int dry_run = 0;
int do_xfers = 1;
-@@ -310,6 +311,9 @@ void usage(enum logcode F)
+@@ -319,6 +320,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");
+#endif
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
- rprintf(F," -d, --dirs transfer directories without recursing\n");
-@@ -506,6 +510,9 @@ static struct poptOption long_options[]
+ rprintf(F," --append-verify like --append, but with old data in file checksum\n");
+@@ -522,6 +526,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 },
{"update", 'u', POPT_ARG_NONE, &update_only, 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 },
-@@ -1603,6 +1610,11 @@ void server_options(char **args,int *arg
+@@ -1664,6 +1671,11 @@ void server_options(char **args, int *ar
if (!am_sender)
args[ac++] = "--sender";
+
x = 1;
argstr[0] = '-';
- for (i = 0; i < verbose; i++)
+
--- old/receiver.c
+++ new/receiver.c
@@ -62,6 +62,10 @@ static int phase = 0, redoing = 0;
*
--- old/rsync.yo
+++ new/rsync.yo
-@@ -335,6 +335,7 @@ to the detailed description below for a
+@@ -353,6 +353,7 @@ to the detailed description below for a
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy files whole (without rsync algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -956,6 +957,10 @@ NOTE: Don't use this option when the des
+@@ -1009,6 +1010,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.
+++ new/sender.c
@@ -46,6 +46,10 @@ extern int write_batch;
extern struct stats stats;
- extern struct file_list *cur_flist, *first_flist;
+ extern struct file_list *cur_flist, *first_flist, *dir_flist;
+#ifdef HAVE_POSIX_FADVISE64
+#define close(fd) fadv_close(fd)
int
--- old/util.c
+++ new/util.c
-@@ -25,6 +25,7 @@
+@@ -26,6 +26,7 @@
extern int verbose;
extern int dry_run;
extern int module_id;
extern int modify_window;
extern int relative_paths;
extern int human_readable;
-@@ -39,6 +40,131 @@ char curr_dir[MAXPATHLEN];
+@@ -41,6 +42,131 @@ char curr_dir[MAXPATHLEN];
unsigned int curr_dir_len;
int curr_dir_depth; /* This is only set for a sanitizing daemon. */