diff options
author | Wayne Davison <wayned@samba.org> | 2014-06-08 10:22:09 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2014-06-08 10:42:14 -0700 |
commit | ff08acd4f24e74019dd75420fd8373fad563c1af (patch) | |
tree | dd08d095b23b7e5a075d731ecc7829789756de93 /receiver.c | |
parent | 03bb593f812ac0a1c4a6b38d333e31f149f3a451 (diff) | |
download | android_external_rsync-ff08acd4f24e74019dd75420fd8373fad563c1af.tar.gz android_external_rsync-ff08acd4f24e74019dd75420fd8373fad563c1af.tar.bz2 android_external_rsync-ff08acd4f24e74019dd75420fd8373fad563c1af.zip |
Added a flag to disable xattr hlink optimization.
I added a compatibility flag for protocol 31 that will let both sides
know if they should be using the xattr optimization that attempted to
avoid sending xattr info for hardlinked files. Since this optimization
was causing some issues, this compatibility flag will ensure that both
sides know if they should be trying to use the optimization or not.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -30,6 +30,7 @@ extern int inc_recurse; extern int log_before_transfer; extern int stdout_format_has_i; extern int logfile_format_has_i; +extern int want_xattr_optim; extern int csum_length; extern int read_batch; extern int write_batch; @@ -583,14 +584,16 @@ int recv_files(int f_in, int f_out, char *local_name) rprintf(FINFO, "recv_files(%s)\n", fname); #ifdef SUPPORT_XATTRS - if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) + if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers + && !(want_xattr_optim && BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) recv_xattr_request(file, f_in); #endif if (!(iflags & ITEM_TRANSFER)) { maybe_log_item(file, iflags, itemizing, xname); #ifdef SUPPORT_XATTRS - if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) + if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers + && !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) set_file_attrs(fname, file, NULL, fname, 0); #endif if (iflags & ITEM_IS_NEW) { |