-+verb( rsync alias --cc --checksum-updating --exclude=.rsyncsums)
-+
-+An rsync daemon does not allow the client to control this setting, so see
-+the "checksum updating" daemon config option for information on how to make
-+a daemon maintain these checksum files.
-+
- dit(bf(-a, --archive)) This is equivalent to bf(-rlptgoD). It is a quick
- way of saying you want recursion and want to preserve almost
- everything (with -H being a notable omission).
---- old/rsyncd.conf.yo
-+++ new/rsyncd.conf.yo
-@@ -198,6 +198,20 @@ locking on this file to ensure that the
- exceeded for the modules sharing the lock file.
- The default is tt(/var/run/rsyncd.lock).
-
-+dit(bf(checksum updating)) This option tells rsync to update/create the
-+checksum information in the per-directory checksum files when users copy
-+files using the bf(--checksum) option. Any file that has changed since it
-+was last checksummed (or is not mentioned) has its data updated in the
-+.rsyncsums file.
-+
-+Note that this updating will occur even if the module is listed as being
-+read-only. If you want to hide these files (and you will almost always
-+want to do), add ".rsyncsums" to the module's exclude setting.
-+
-+Note also that the client's command-line option, bf(--checksum-updating),
-+has no effect on a daemon. A daemon will only update/create checksum files
-+if this config option is true.
-+
- dit(bf(read only)) The "read only" option determines whether clients
+ info_levels[INFO_FLIST] = save_info_flist;
+ info_levels[INFO_PROGRESS] = save_info_progress;
+
+diff --git a/io.c b/io.c
+--- a/io.c
++++ b/io.c
+@@ -52,6 +52,7 @@ extern int list_only;
+ extern int read_batch;
+ extern int protect_args;
+ extern int checksum_seed;
++extern int checksum_files;
+ extern int protocol_version;
+ extern int remove_source_files;
+ extern int preserve_hard_links;
+@@ -875,6 +876,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
+ flist_ndx_push(&hlink_list, ndx);
+ flist->in_progress++;
+ }
++ } else if (checksum_files & CSF_UPDATE) {
++ struct file_struct *file = flist->files[ndx - flist->ndx_start];
++ set_cached_checksum(flist, file);
+ }
+ break;
+ case FES_REDO:
+diff --git a/loadparm.c b/loadparm.c
+--- a/loadparm.c
++++ b/loadparm.c
+@@ -312,6 +312,10 @@ static struct enum_list enum_csum_modes[] = {
+ { CSF_IGNORE_FILES, "none" },
+ { CSF_LAX_MODE, "lax" },
+ { CSF_STRICT_MODE, "strict" },
++ { CSF_LAX_MODE|CSF_UPDATE, "+lax" },
++ { CSF_STRICT_MODE|CSF_UPDATE, "+strict" },
++ { CSF_LAX_MODE|CSF_UPDATE|CSF_AFFECT_DRYRUN, "++lax" },
++ { CSF_STRICT_MODE|CSF_UPDATE|CSF_AFFECT_DRYRUN, "++strict" },
+ { -1, NULL }
+ };
+
+diff --git a/options.c b/options.c
+--- a/options.c
++++ b/options.c
+@@ -1637,7 +1637,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+
+ case OPT_SUMFILES:
+ arg = poptGetOptArg(pc);
+- checksum_files = 0;
++ if (*arg == '+') {
++ arg++;
++ checksum_files = CSF_UPDATE;
++ if (*arg == '+') {
++ arg++;
++ checksum_files |= CSF_AFFECT_DRYRUN;
++ }
++ } else
++ checksum_files = 0;
+ if (strcmp(arg, "lax") == 0)
+ checksum_files |= CSF_LAX_MODE;
+ else if (strcmp(arg, "strict") == 0)
+diff --git a/receiver.c b/receiver.c
+--- a/receiver.c
++++ b/receiver.c
+@@ -47,6 +47,7 @@ extern int sparse_files;
+ extern int keep_partial;
+ extern int checksum_len;
+ extern int checksum_seed;
++extern int checksum_files;
+ extern int inplace;
+ extern int delay_updates;
+ extern mode_t orig_umask;
+@@ -376,7 +377,7 @@ static void handle_delayed_updates(char *local_name)
+ "rename failed for %s (from %s)",
+ full_fname(fname), partialptr);
+ } else {
+- if (remove_source_files
++ if (remove_source_files || checksum_files & CSF_UPDATE
+ || (preserve_hard_links && F_IS_HLINKED(file)))
+ send_msg_int(MSG_SUCCESS, ndx);
+ handle_partial_dir(partialptr, PDIR_DELETE);
+@@ -829,7 +830,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+ case 2:
+ break;
+ case 1:
+- if (remove_source_files || inc_recurse
++ if (remove_source_files || inc_recurse || checksum_files & CSF_UPDATE
+ || (preserve_hard_links && F_IS_HLINKED(file)))
+ send_msg_int(MSG_SUCCESS, ndx);
+ break;
+diff --git a/rsync.h b/rsync.h
+--- a/rsync.h
++++ b/rsync.h
+@@ -917,6 +917,8 @@ typedef struct {
+
+ #define CSF_ENABLE (1<<1)
+ #define CSF_LAX (1<<2)
++#define CSF_UPDATE (1<<3)
++#define CSF_AFFECT_DRYRUN (1<<4)
+
+ #define CSF_IGNORE_FILES 0
+ #define CSF_LAX_MODE (CSF_ENABLE|CSF_LAX)
+diff --git a/rsync.yo b/rsync.yo
+--- a/rsync.yo
++++ b/rsync.yo
+@@ -599,9 +599,13 @@ computed just as it would be if bf(--sumfiles) was not specified.
+
+ The MODE value is either "lax", for relaxed checking (which compares size
+ and mtime), "strict" (which also compares ctime and inode), or "none" to
+-ignore any .rsyncsums files ("none" is the default). Rsync does not create
+-or update these files, but there is a perl script in the support directory
+-named "rsyncsums" that can be used for that.
++ignore any .rsyncsums files ("none" is the default).
++If you want rsync to create and/or update these files, specify a prefixed
++plus ("+lax" or "+strict").
++Adding a second prefixed '+' causes the checksum-file updates to happen
++even when the transfer is in bf(--dry-run) mode ("++lax" or "++strict").
++There is also a perl script in the support directory named "rsyncsums"
++that can be used to update the .rsyncsums files.
+
+ This option has no effect unless bf(--checksum, -c) was also specified. It
+ also only affects the current side of the transfer, so if you want the
+diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
+--- a/rsyncd.conf.yo
++++ b/rsyncd.conf.yo
+@@ -315,13 +315,15 @@ The default is tt(/var/run/rsyncd.lock).
+ 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)
+-option for what these choices do.
++to either "lax", "strict", "+lax", "+strict", "++lax", "++strict", or
++"none". See the client's bf(--sumfiles) option for what these choices do.
+
+ Note also that the client's command-line option, bf(--sumfiles), has no
+ effect on a daemon. A daemon will only access checksum files if this
+-config option tells it to. See also the bf(exclude) directive for a way
+-to hide the .rsyncsums files from the user.
++config option tells it to. You can configure updating of the .rsyncsums
++files even if the module itself is configured to be read-only. See also
++the bf(exclude) directive for a way to hide the .rsyncsums files from the
++user.
+
+ dit(bf(read only)) This parameter determines whether clients