The patches for 3.0.3pre3.
[rsync/rsync-patches.git] / checksum-reading.diff
index 159c7ad..dea3167 100644 (file)
@@ -40,7 +40,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern int io_timeout;
  extern int no_detach;
  extern int write_batch;
-@@ -782,6 +784,9 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -780,6 +782,9 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
        } else if (am_root < 0) /* Treat --fake-super from client as --super. */
                am_root = 2;
  
@@ -342,7 +342,7 @@ diff --git a/flist.c b/flist.c
  /* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
   * F_PATHNAME(), or (2) "NULL, dir, dirlen" to chdir() to the supplied dir,
   * with dir == NULL taken to be the starting directory, and dirlen < 0
-@@ -1010,7 +1255,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1032,7 +1277,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                              STRUCT_STAT *stp, int flags, int filter_level)
  {
        static char *lastdir;
@@ -351,7 +351,7 @@ diff --git a/flist.c b/flist.c
        struct file_struct *file;
        char thisname[MAXPATHLEN];
        char linkname[MAXPATHLEN];
-@@ -1160,9 +1405,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1171,9 +1416,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                        memcpy(lastdir, thisname, len);
                        lastdir[len] = '\0';
                        lastdir_len = len;
@@ -369,7 +369,7 @@ diff --git a/flist.c b/flist.c
        basename_len = strlen(basename) + 1; /* count the '\0' */
  
  #ifdef SUPPORT_LINKS
-@@ -1235,14 +1487,18 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1250,14 +1502,18 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                memcpy(bp + basename_len, linkname, linkname_len);
  #endif
  
@@ -391,7 +391,7 @@ diff --git a/flist.c b/flist.c
        /* 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) {
-@@ -2155,7 +2411,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2177,7 +2433,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                         * file-list to check if this is a 1-file xfer. */
                        send_extra_file_list(f, 1);
                }
@@ -401,7 +401,7 @@ diff --git a/flist.c b/flist.c
  
        return flist;
  }
-@@ -2257,7 +2514,7 @@ struct file_list *recv_file_list(int f)
+@@ -2279,7 +2536,7 @@ struct file_list *recv_file_list(int f)
        else if (f >= 0)
                recv_id_list(f, flist);
  
@@ -410,7 +410,7 @@ diff --git a/flist.c b/flist.c
  
        if (protocol_version < 30) {
                /* Recv the io_error flag */
-@@ -2455,7 +2712,7 @@ void flist_free(struct file_list *flist)
+@@ -2477,7 +2734,7 @@ void flist_free(struct file_list *flist)
  
  /* This routine ensures we don't have any duplicate names in our file list.
   * duplicate names can cause corruption because of the pipelining. */
@@ -419,7 +419,7 @@ diff --git a/flist.c b/flist.c
  {
        char fbuf[MAXPATHLEN];
        int i, prev_i;
-@@ -2506,7 +2763,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2528,7 +2785,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
                        /* If one is a dir and the other is not, we want to
                         * keep the dir because it might have contents in the
                         * list.  Otherwise keep the first one. */
@@ -428,7 +428,7 @@ diff --git a/flist.c b/flist.c
                                struct file_struct *fp = flist->sorted[j];
                                if (!S_ISDIR(fp->mode))
                                        keep = i, drop = j;
-@@ -2522,8 +2779,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2544,8 +2801,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
                        } else
                                keep = j, drop = i;
  
@@ -439,7 +439,7 @@ diff --git a/flist.c b/flist.c
                                        rprintf(FINFO,
                                            "removing duplicate name %s from file list (%d)\n",
                                            f_name(file, fbuf), drop + flist->ndx_start);
-@@ -2545,7 +2802,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2567,7 +2824,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
        }
        flist->high = prev_i;
  
@@ -459,7 +459,7 @@ diff --git a/generator.c b/generator.c
  extern int remove_source_files;
  extern int delay_updates;
  extern int update_only;
-@@ -709,7 +710,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -712,7 +713,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  
  
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
@@ -468,7 +468,7 @@ diff --git a/generator.c b/generator.c
  {
        if (st->st_size != F_LENGTH(file))
                return 0;
-@@ -718,7 +719,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -721,7 +722,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
@@ -480,7 +480,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
  
-@@ -972,7 +976,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -984,7 +988,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                        match_level = 1;
                        /* FALL THROUGH */
                case 1:
@@ -489,7 +489,7 @@ diff --git a/generator.c b/generator.c
                                continue;
                        best_match = j;
                        match_level = 2;
-@@ -1245,7 +1249,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1257,7 +1261,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
         * --ignore-non-existing, daemon exclude, or mkdir failure. */
        static struct file_struct *skip_dir = NULL;
        static struct file_list *fuzzy_dirlist = NULL;
@@ -498,7 +498,7 @@ diff --git a/generator.c b/generator.c
        struct file_struct *fuzzy_file = NULL;
        int fd = -1, f_copy = -1;
        stat_x sx, real_sx;
-@@ -1334,8 +1338,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1346,8 +1350,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                flist_free(fuzzy_dirlist);
                                fuzzy_dirlist = NULL;
                        }
@@ -509,7 +509,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                        if (!preserve_perms)
                                dflt_perms = default_perms_for_dir(dn);
-@@ -1343,10 +1347,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1355,10 +1359,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
                parent_dirname = dn;
  
@@ -529,7 +529,7 @@ diff --git a/generator.c b/generator.c
                }
  
                statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
-@@ -1775,7 +1784,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1792,7 +1801,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
                ;
@@ -541,7 +541,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/hlink.c b/hlink.c
 --- a/hlink.c
 +++ b/hlink.c
-@@ -384,7 +384,7 @@ int hard_link_check(struct file_struct *file, int ndx, const char *fname,
+@@ -385,7 +385,7 @@ int hard_link_check(struct file_struct *file, int ndx, const char *fname,
                                }
                                break;
                        }
@@ -687,7 +687,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -686,6 +686,10 @@ extern int xattrs_ndx;
+@@ -687,6 +687,10 @@ extern int xattrs_ndx;
  #define F_SUM(f) ((char*)OPT_EXTRA(f, LEN64_BUMP(f) + HLINK_BUMP(f) \
                                    + SUM_EXTRA_CNT - 1))
  
@@ -698,7 +698,7 @@ diff --git a/rsync.h b/rsync.h
  /* Some utility defines: */
  #define F_IS_ACTIVE(f) (f)->basename[0]
  #define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
-@@ -864,6 +868,13 @@ typedef struct {
+@@ -865,6 +869,13 @@ typedef struct {
        char fname[1]; /* has variable size */
  } relnamecache;
  
@@ -788,7 +788,7 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
  exceeded for the modules sharing the lock file.
  The default is tt(/var/run/rsyncd.lock).
  
-+dit(bf(checksum files)) This option tells rsync to make use of any cached
++dit(bf(checksum files)) This parameter tells rsync to make use of any cached
 +checksum information it finds in per-directory .rsyncsums files when the
 +current transfer is using the bf(--checksum) option.  The value can be set
 +to either "lax", "strict", or "none" -- see the client's bf(--sumfiles)
@@ -799,7 +799,7 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 +config option tells it to.  See also the bf(exclude) directive for a way
 +to hide the .rsyncsums files from the user.
 +
- dit(bf(read only)) The "read only" option determines whether clients
+ dit(bf(read only)) This parameter determines whether clients
  will be able to upload files or not. If "read only" is true then any
  attempted uploads will fail. If "read only" is false then uploads will
 diff --git a/support/rsyncsums b/support/rsyncsums