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 /generator.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 'generator.c')
-rw-r--r-- | generator.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generator.c b/generator.c index 0f7a5169..63399d3d 100644 --- a/generator.c +++ b/generator.c @@ -57,6 +57,7 @@ extern int update_only; extern int human_readable; extern int ignore_existing; extern int ignore_non_existing; +extern int want_xattr_optim; extern int inplace; extern int append_mode; extern int make_backups; @@ -553,7 +554,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre #ifdef SUPPORT_XATTRS if (preserve_xattrs && do_xfers && iflags & (ITEM_REPORT_XATTR|ITEM_TRANSFER)) { - int fd = iflags & ITEM_REPORT_XATTR ? sock_f_out : -1; + int fd = iflags & ITEM_REPORT_XATTR + && !(want_xattr_optim && BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) + ? sock_f_out : -1; send_xattr_request(NULL, file, fd); } #endif |