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:
09add1a
)
Optimized the calling of access() in one loop.
author
Wayne Davison
<wayned@samba.org>
Wed, 23 Jun 2004 17:32:40 +0000
(17:32 +0000)
committer
Wayne Davison
<wayned@samba.org>
Wed, 23 Jun 2004 17:32:40 +0000
(17:32 +0000)
compare-dest.diff
patch
|
blob
|
blame
|
history
diff --git
a/compare-dest.diff
b/compare-dest.diff
index
5a76655
..
1b2b4d3
100644
(file)
--- a/
compare-dest.diff
+++ b/
compare-dest.diff
@@
-4,8
+4,8
@@
algorithm does NOT search for the best match -- it stops at the first
match and uses that as the basis file for the transfer, so be sure to
order your arguments appropriately.
match and uses that as the basis file for the transfer, so be sure to
order your arguments appropriately.
---- generator.c
18 Jun 2004 16:30:24 -0000 1.88
-+++ generator.c 23 Jun 2004 17:
08:1
9 -0000
+--- generator.c
23 Jun 2004 16:51:21 -0000 1.89
++++ generator.c 23 Jun 2004 17:
29:3
9 -0000
@@ -42,7 +42,7 @@ extern int size_only;
extern int io_timeout;
extern int protocol_version;
@@ -42,7 +42,7 @@ extern int size_only;
extern int io_timeout;
extern int protocol_version;
@@
-15,7
+15,7
@@
order your arguments appropriately.
extern int link_dest;
extern int whole_file;
extern int local_server;
extern int link_dest;
extern int whole_file;
extern int local_server;
-@@ -8
1,13 +81
,12 @@ static int skip_file(char *fname, struct
+@@ -8
0,13 +80
,12 @@ static int skip_file(char *fname, struct
if (always_checksum && S_ISREG(st->st_mode)) {
char sum[MD4_SUM_LENGTH];
char fnamecmpdest[MAXPATHLEN];
if (always_checksum && S_ISREG(st->st_mode)) {
char sum[MD4_SUM_LENGTH];
char fnamecmpdest[MAXPATHLEN];
@@
-27,14
+27,14
@@
order your arguments appropriately.
- compare_dest, fname);
- fname = fnamecmpdest;
- }
- compare_dest, fname);
- fname = fnamecmpdest;
- }
-+ for (i = 0;
access(fname, 0) != 0 && compare_dest[i] != NULL
; i++) {
++ for (i = 0;
compare_dest[i] != NULL && access(fname, 0) < 0
; i++) {
+ pathjoin(fnamecmpdest, sizeof fnamecmpdest,
+ compare_dest[i], fname);
+ fname = fnamecmpdest;
}
file_checksum(fname,sum,st->st_size);
return memcmp(sum, file->u.sum, protocol_version < 21 ? 2
+ pathjoin(fnamecmpdest, sizeof fnamecmpdest,
+ compare_dest[i], fname);
+ fname = fnamecmpdest;
}
file_checksum(fname,sum,st->st_size);
return memcmp(sum, file->u.sum, protocol_version < 21 ? 2
-@@ -42
6,13 +425
,18 @@ void recv_generator(char *fname, struct
+@@ -42
3,13 +422
,18 @@ void recv_generator(char *fname, struct
fnamecmp = fname;
fnamecmp = fname;
@@
-59,7
+59,7
@@
order your arguments appropriately.
errno = saveerrno;
#if HAVE_LINK
--- options.c 20 Jun 2004 19:47:05 -0000 1.157
errno = saveerrno;
#if HAVE_LINK
--- options.c 20 Jun 2004 19:47:05 -0000 1.157
-+++ options.c 23 Jun 2004 17:
08:1
9 -0000
++++ options.c 23 Jun 2004 17:
29:3
9 -0000
@@ -117,7 +117,8 @@ unsigned int backup_dir_remainder;
char *backup_suffix = NULL;
@@ -117,7 +117,8 @@ unsigned int backup_dir_remainder;
char *backup_suffix = NULL;
@@
-187,7
+187,7
@@
order your arguments appropriately.
if (files_from && (!am_sender || remote_filesfrom_file)) {
--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82
if (files_from && (!am_sender || remote_filesfrom_file)) {
--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82
-+++ receiver.c 23 Jun 2004 17:
08:1
9 -0000
++++ receiver.c 23 Jun 2004 17:
29:3
9 -0000
@@ -36,7 +36,7 @@ extern int preserve_perms;
extern int cvs_exclude;
extern int io_error;
@@ -36,7 +36,7 @@ extern int preserve_perms;
extern int cvs_exclude;
extern int io_error;
@@
-220,7
+220,7
@@
order your arguments appropriately.
fd1 = do_open(fnamecmp, O_RDONLY, 0);
}
--- rsync.h 16 May 2004 07:28:24 -0000 1.204
fd1 = do_open(fnamecmp, O_RDONLY, 0);
}
--- rsync.h 16 May 2004 07:28:24 -0000 1.204
-+++ rsync.h 23 Jun 2004 17:
08:2
0 -0000
++++ rsync.h 23 Jun 2004 17:
29:4
0 -0000
@@ -98,6 +98,8 @@
#define MAX_ARGS 1000
@@ -98,6 +98,8 @@
#define MAX_ARGS 1000