diff options
author | Wayne Davison <wayned@samba.org> | 2014-01-19 14:59:43 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2014-01-19 14:59:43 -0800 |
commit | 740551d6576f28b42bc53c3e7e7e150adafa20e4 (patch) | |
tree | d7535ac23a456ae4d5e178c3d24fad0ab455b01e | |
parent | a106ed78d57f901ccfdf5145923f8c2bf6b33ef8 (diff) | |
download | android_external_rsync-740551d6576f28b42bc53c3e7e7e150adafa20e4.tar.gz android_external_rsync-740551d6576f28b42bc53c3e7e7e150adafa20e4.tar.bz2 android_external_rsync-740551d6576f28b42bc53c3e7e7e150adafa20e4.zip |
Undo the hard-link xattr optimization in 78286a03.
I'm backing out the xattr optimization that was put in to try
to make xattr data sending more optimal on hard-linked files.
The code was causing hard-to-reproduce bugs, and it's better to
get things done fully & correctly over fully optimally.
-rw-r--r-- | generator.c | 4 | ||||
-rw-r--r-- | receiver.c | 6 | ||||
-rw-r--r-- | sender.c | 3 |
3 files changed, 4 insertions, 9 deletions
diff --git a/generator.c b/generator.c index b2ca2e05..0f77481e 100644 --- a/generator.c +++ b/generator.c @@ -550,9 +550,7 @@ 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 - && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) - ? sock_f_out : -1; + int fd = iflags & ITEM_REPORT_XATTR ? sock_f_out : -1; send_xattr_request(NULL, file, fd); } #endif @@ -580,16 +580,14 @@ 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 - && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) + if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) 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 - && !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) + if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) set_file_attrs(fname, file, NULL, fname, 0); #endif if (iflags & ITEM_IS_NEW) { @@ -177,8 +177,7 @@ static void write_ndx_and_attrs(int f_out, int ndx, int iflags, if (iflags & ITEM_XNAME_FOLLOWS) write_vstring(f_out, buf, len); #ifdef SUPPORT_XATTRS - if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers - && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) + if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) send_xattr_request(fname, file, f_out); #endif } |