Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f2acdf8
)
Fixed a failing hunk.
author
Wayne Davison
<wayned@samba.org>
Mon, 17 Sep 2007 01:48:07 +0000
(
01:48
+0000)
committer
Wayne Davison
<wayned@samba.org>
Mon, 17 Sep 2007 01:48:07 +0000
(
01:48
+0000)
checksum-updating.diff
patch
|
blob
|
blame
|
history
diff --git
a/checksum-updating.diff
b/checksum-updating.diff
index
f3a1c1d
..
309b516
100644
(file)
--- a/
checksum-updating.diff
+++ b/
checksum-updating.diff
@@
-19,7
+19,7
@@
To use this patch, run these commands for a successful build:
extern int io_timeout;
extern int no_detach;
extern int default_af_hint;
extern int io_timeout;
extern int no_detach;
extern int default_af_hint;
-@@ -6
41,6 +642
,8 @@ static int rsync_module(int f_in, int f_
+@@ -6
76,6 +677
,8 @@ static int rsync_module(int f_in, int f_
else if (am_root < 0) /* Treat --fake-super from client as --super. */
am_root = 2;
else if (am_root < 0) /* Treat --fake-super from client as --super. */
am_root = 2;
@@
-38,7
+38,7
@@
To use this patch, run these commands for a successful build:
extern int list_only;
extern int am_root;
extern int am_server;
extern int list_only;
extern int am_root;
extern int am_server;
-@@ -5
7,6 +58
,7 @@ extern int implied_dirs;
+@@ -5
8,6 +59
,7 @@ extern int implied_dirs;
extern int file_extra_cnt;
extern int ignore_perishable;
extern int non_perishable_cnt;
extern int file_extra_cnt;
extern int ignore_perishable;
extern int non_perishable_cnt;
@@
-46,7
+46,7
@@
To use this patch, run these commands for a successful build:
extern int prune_empty_dirs;
extern int copy_links;
extern int copy_unsafe_links;
extern int prune_empty_dirs;
extern int copy_links;
extern int copy_unsafe_links;
-@@ -
79,6 +81
,9 @@ extern iconv_t ic_send, ic_recv;
+@@ -
81,6 +83
,9 @@ extern iconv_t ic_send, ic_recv;
#define PTR_SIZE (sizeof (struct file_struct *))
#define PTR_SIZE (sizeof (struct file_struct *))
@@
-56,18
+56,18
@@
To use this patch, run these commands for a successful build:
int io_error;
int checksum_len;
dev_t filesystem_dev; /* used to implement -x */
int io_error;
int checksum_len;
dev_t filesystem_dev; /* used to implement -x */
-@@ -101,6 +106,10 @@ static char tmp_sum[MAX_DIGEST_LEN];
- static char empty_sum[MAX_DIGEST_LEN];
+@@ -116,6 +121,10 @@ static char empty_sum[MAX_DIGEST_LEN];
static int flist_count_offset; /* for --delete --progress */
static int dir_count = 0;
static int flist_count_offset; /* for --delete --progress */
static int dir_count = 0;
-
+static struct file_list *checksum_flist = NULL
;
+
static int high_hlink_ndx
;
+static int checksum_matches = 0;
+static int checksum_updates = 0;
+static int regular_skipped = 0;
+static int checksum_matches = 0;
+static int checksum_updates = 0;
+static int regular_skipped = 0;
++static struct file_list *checksum_flist = NULL;
static void clean_flist(struct file_list *flist, int strip_root);
static void output_flist(struct file_list *flist);
static void clean_flist(struct file_list *flist, int strip_root);
static void output_flist(struct file_list *flist);
-@@ -3
17,6 +326
,301 @@ static void flist_done_allocating(struct
+@@ -3
32,6 +341
,301 @@ static void flist_done_allocating(struct
flist->pool_boundary = ptr;
}
flist->pool_boundary = ptr;
}
@@
-200,7
+200,7
@@
To use this patch, run these commands for a successful build:
+ } while (++cp != end);
+ } else {
+ do {
+ } while (++cp != end);
+ } else {
+ do {
-+ fprintf(out_fp, "%02x", CVAL(cp, 0));
++ fprintf(out_fp, "%02x",
(int)
CVAL(cp, 0));
+ } while (++cp != end);
+ }
+ if (protocol_version < 30)
+ } while (++cp != end);
+ }
+ if (protocol_version < 30)
@@
-369,7
+369,7
@@
To use this patch, run these commands for a successful build:
int push_pathname(const char *dir, int len)
{
if (dir == pathname)
int push_pathname(const char *dir, int len)
{
if (dir == pathname)
-@@ -
989,7 +1293
,7 @@ struct file_struct *make_file(const char
+@@ -
1010,7 +1314
,7 @@ struct file_struct *make_file(const char
STRUCT_STAT *stp, int flags, int filter_level)
{
static char *lastdir;
STRUCT_STAT *stp, int flags, int filter_level)
{
static char *lastdir;
@@
-378,7
+378,7
@@
To use this patch, run these commands for a successful build:
struct file_struct *file;
char thisname[MAXPATHLEN];
char linkname[MAXPATHLEN];
struct file_struct *file;
char thisname[MAXPATHLEN];
char linkname[MAXPATHLEN];
-@@ -10
76,6 +1380
,8 @@ struct file_struct *make_file(const char
+@@ -10
97,6 +1401
,8 @@ struct file_struct *make_file(const char
if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
if (ignore_perishable)
non_perishable_cnt++;
if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
if (ignore_perishable)
non_perishable_cnt++;
@@
-387,7
+387,7
@@
To use this patch, run these commands for a successful build:
return NULL;
}
return NULL;
}
-@@ -11
14,9 +1420
,16 @@ struct file_struct *make_file(const char
+@@ -11
35,9 +1441
,16 @@ struct file_struct *make_file(const char
memcpy(lastdir, thisname, len);
lastdir[len] = '\0';
lastdir_len = len;
memcpy(lastdir, thisname, len);
lastdir[len] = '\0';
lastdir_len = len;
@@
-405,7
+405,7
@@
To use this patch, run these commands for a successful build:
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
-@@ -1
192,11 +1505
,44 @@ struct file_struct *make_file(const char
+@@ -1
213,11 +1526
,44 @@ struct file_struct *make_file(const char
}
#endif
}
#endif
@@
-453,7
+453,7
@@
To use this patch, run these commands for a successful build:
/* This code is only used by the receiver when it is building
* a list of files for a delete pass. */
if (keep_dirlinks && linkname_len && flist) {
/* This code is only used by the receiver when it is building
* a list of files for a delete pass. */
if (keep_dirlinks && linkname_len && flist) {
-@@ -1
489,6 +1835
,9 @@ static void send_directory(int f, struct
+@@ -1
510,6 +1856
,9 @@ static void send_directory(int f, struct
closedir(d);
closedir(d);
@@
-463,7
+463,7
@@
To use this patch, run these commands for a successful build:
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
-@@ -19
32,7 +228
1,11 @@ struct file_list *send_file_list(int f,
+@@ -19
52,7 +230
1,11 @@ struct file_list *send_file_list(int f,
* file-list to check if this is a 1-file xfer. */
send_extra_file_list(f, 1);
}
* file-list to check if this is a 1-file xfer. */
send_extra_file_list(f, 1);
}
@@
-476,7
+476,7
@@
To use this patch, run these commands for a successful build:
return flist;
}
return flist;
}
-@@ -22
25,7 +257
8,7 @@ void flist_free(struct file_list *flist)
+@@ -22
45,7 +259
8,7 @@ void flist_free(struct file_list *flist)
if (!flist->prev || !flist_cnt)
pool_destroy(flist->file_pool);
if (!flist->prev || !flist_cnt)
pool_destroy(flist->file_pool);
@@
-529,7
+529,7
@@
To use this patch, run these commands for a successful build:
int max_delete = INT_MIN;
OFF_T max_size = 0;
OFF_T min_size = 0;
int max_delete = INT_MIN;
OFF_T max_size = 0;
OFF_T min_size = 0;
-@@ -30
8,6 +309
,7 @@ void usage(enum logcode F)
+@@ -30
9,6 +310
,7 @@ void usage(enum logcode F)
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
@@
-537,7
+537,7
@@
To use this patch, run these commands for a successful build:
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
-@@ -5
47,6 +54
9,7 @@ static struct poptOption long_options[]
+@@ -5
57,6 +55
9,7 @@ static struct poptOption long_options[]
{"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
{"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
{"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
@@
-545,7
+545,7
@@
To use this patch, run these commands for a successful build:
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -19
10,7 +1913,9 @@ void server_options(char **args,int *arg
+@@ -19
48,7 +1951,9 @@ void server_options(char **args, int *ar
args[ac++] = basis_dir[i];
}
}
args[ac++] = basis_dir[i];
}
}
@@
-554,11
+554,11
@@
To use this patch, run these commands for a successful build:
+ args[ac++] = "--checksum-updating";
+
+ args[ac++] = "--checksum-updating";
+
- if (append_mode)
- args[ac++] = "--append";
+ if (append_mode)
{
+ if (append_mode > 1)
--- old/rsync.h
+++ new/rsync.h
--- old/rsync.h
+++ new/rsync.h
-@@ -6
41,6 +64
1,10 @@ extern int xattrs_ndx;
+@@ -6
31,6 +63
1,10 @@ extern int xattrs_ndx;
#define F_SUM(f) ((char*)OPT_EXTRA(f, LEN64_BUMP(f) + HLINK_BUMP(f) \
+ SUM_EXTRA_CNT - 1))
#define F_SUM(f) ((char*)OPT_EXTRA(f, LEN64_BUMP(f) + HLINK_BUMP(f) \
+ SUM_EXTRA_CNT - 1))
@@
-569,7
+569,7
@@
To use this patch, run these commands for a successful build:
/* Some utility defines: */
#define F_IS_ACTIVE(f) (f)->basename[0]
#define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
/* Some utility defines: */
#define F_IS_ACTIVE(f) (f)->basename[0]
#define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
-@@ -10
77,6 +1081
,12 @@ isDigit(const char *ptr)
+@@ -10
69,6 +1073
,12 @@ isDigit(const char *ptr)
}
static inline int
}
static inline int
@@
-592,7
+592,7
@@
To use this patch, run these commands for a successful build:
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
-r, --recursive recurse into directories
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
-r, --recursive recurse into directories
-@@ -51
8,9 +519
,9 @@ uses a "quick check" that (by default) c
+@@ -51
9,9 +520
,9 @@ uses a "quick check" that (by default) c
of last modification match between the sender and receiver. This option
changes this to compare a 128-bit MD4 checksum for each file that has a
matching size. Generating the checksums means that both sides will expend
of last modification match between the sender and receiver. This option
changes this to compare a 128-bit MD4 checksum for each file that has a
matching size. Generating the checksums means that both sides will expend
@@
-605,7
+605,7
@@
To use this patch, run these commands for a successful build:
The sending side generates its checksums while it is doing the file-system
scan that builds the list of the available files. The receiver generates
The sending side generates its checksums while it is doing the file-system
scan that builds the list of the available files. The receiver generates
-@@ -52
8,12 +529
,42 @@ its checksums when it is scanning for ch
+@@ -52
9,12 +530
,42 @@ its checksums when it is scanning for ch
file that has the same size as the corresponding sender's file: files with
either a changed size or a changed checksum are selected for transfer.
file that has the same size as the corresponding sender's file: files with
either a changed size or a changed checksum are selected for transfer.