summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2016-10-10 11:49:50 -0700
committerWayne Davison <wayned@samba.org>2016-10-10 11:53:03 -0700
commitf3873b3d88b61167b106e7b9227a20147f8f6197 (patch)
treedb2f44530da787ecd2da0d03e7770459c899e563 /options.c
parent6e3b2102bc2c7df42aa4961a6460eae954c95af2 (diff)
downloadrsync-f3873b3d88b61167b106e7b9227a20147f8f6197.tar.gz
Support --sparse combined with --preallocate or --inplace.
The new code tries to punch holes in the destination file using newer Linux fallocate features. It also supports a --whole-file + --sparse + --inplace copy on any filesystem by truncating the destination file.
Diffstat (limited to 'options.c')
-rw-r--r--options.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/options.c b/options.c
index 308443bd..6ba13b7d 100644
--- a/options.c
+++ b/options.c
@@ -714,7 +714,7 @@ void usage(enum logcode F)
#ifdef SUPPORT_XATTRS
rprintf(F," --fake-super store/recover privileged attrs using xattrs\n");
#endif
- rprintf(F," -S, --sparse handle sparse files efficiently\n");
+ rprintf(F," -S, --sparse turn sequences of nulls into sparse blocks\n");
#ifdef SUPPORT_PREALLOCATION
rprintf(F," --preallocate allocate dest files before writing them\n");
#else
@@ -2237,14 +2237,6 @@ int parse_arguments(int *argc_p, const char ***argv_p)
bwlimit_writemax = 512;
}
- if (sparse_files && inplace) {
- /* Note: we don't check for this below, because --append is
- * OK with --sparse (as long as redos are handled right). */
- snprintf(err_buf, sizeof err_buf,
- "--sparse cannot be used with --inplace\n");
- return 0;
- }
-
if (append_mode) {
if (whole_file > 0) {
snprintf(err_buf, sizeof err_buf,