diff options
author | Wayne Davison <wayned@samba.org> | 2016-10-10 11:49:50 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2016-10-10 11:53:03 -0700 |
commit | f3873b3d88b61167b106e7b9227a20147f8f6197 (patch) | |
tree | db2f44530da787ecd2da0d03e7770459c899e563 /options.c | |
parent | 6e3b2102bc2c7df42aa4961a6460eae954c95af2 (diff) | |
download | rsync-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.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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, |