Commit Graph

502 Commits

Author SHA1 Message Date
Wayne Davison
ba43e88527 Fix hard-link bugs when receiver isn't capable.
If the receiving side cannot hard-link symlinks and/or special files
(including devices) then we now properly handle incoming hard-linked
items (creating separate identical items).
2014-06-13 16:05:08 -07:00
Wayne Davison
ff08acd4f2 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.
2014-06-08 10:42:14 -07:00
Wayne Davison
3ce7a65c11 Make --omit-dir-times avoid early-create directories. 2014-05-25 16:43:14 -07:00
Wayne Davison
adc600cbe2 Check F_IS_ACTIVE() in a few more spots.
The code needs to ignore flist entries that were marked inactive (by
either duplicate removal or empty-dir pruning) in a few more spots.
2014-04-20 14:41:54 -07:00
Wayne Davison
43d6d0c5ba Change args to file_checksum() to prepare for future changes. 2014-04-19 16:26:35 -07:00
Wayne Davison
dfa5b49110 Bump the year to 2014. 2014-01-26 09:29:15 -08:00
Wayne Davison
740551d657 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.
2014-01-19 14:59:43 -08:00
Wayne Davison
eaa4e2d1ee Fix itemize bug with --link-dest, -X, and -n.
When running with --*-dest & -X, some alt-dest-found files would not
use the right name when looking up old attrs in itemize(), causing a
weird error for a --dry-run copy.  Fixes bug 10238.
2013-11-25 09:18:18 -08:00
Wayne Davison
7e1a9c4d79 Update copyright year. 2013-01-19 11:05:53 -08:00
Wayne Davison
bd7d36cc6c Free ACL/xattr info in try_dests_reg() loop. 2013-01-19 10:25:18 -08:00
Wayne Davison
d42e7181d5 Add free_stat_x() inline function. 2013-01-19 10:25:18 -08:00
Wayne Davison
c03bb3d181 Further improve non-empty-destination --link-dest behavior:
- Avoid relinking a file that is already linked correctly.
- Avoid trashing the stat buffer of an existing file in try_dests_reg().
2013-01-19 10:24:46 -08:00
Wayne Davison
cee326436c Remove -3 return from try_dests_reg() again -- let it do a local copy
when the dest file is unlinked and the hard link fails.
2013-01-19 09:08:39 -08:00
Wayne Davison
e1ded58983 Improve handling of existing files for alt-dest opts.
Fixes bug #5644.
2013-01-18 11:57:49 -08:00
Wayne Davison
b55115ec6f Fix --only-write-batch hang with --hard-links.
Fixes bug 8565.
2012-01-28 12:04:26 -08:00
Wayne Davison
9510fa9ab8 Allow --max-size=0 and --min-size=0.
Fixes bug 7965.
2011-12-24 12:35:37 -08:00
Wayne Davison
a3b62ff4cf Avoid double-free of xattr/acl data in real_sx.
Fixes bug 8665.
2011-12-16 09:07:19 -08:00
Wayne Davison
48b51d0004 make repeated --fuzzy option look into alt-dest dirs. 2011-11-23 12:29:25 -08:00
Wayne Davison
3527677043 Let's cast getpid() to an int instead of a long for snprintf(). 2011-10-08 09:15:36 -07:00
Wayne Davison
a470b675af Dirs need +rx as well as +w for non-super xfers.
Fixes bug 8242.
2011-09-03 12:41:22 -07:00
Wayne Davison
03cd1ae4fa Handle FES_NO_SEND properly on a hard-linked file.
Fixes bug 8246.
2011-07-04 16:13:45 -07:00
Wayne Davison
01580c794a Fix #ifdef in unchanged_attrs(). Fixes bug 8268. 2011-06-26 09:52:47 -07:00
Wayne Davison
5bfe006882 Make daemon-exclude errors more error-like.
Fixes bug 7765.
2011-06-18 12:44:26 -07:00
Wayne Davison
4591bb2f66 Only skip deletions on IOERR_GENERAL. Fixes bug 7809. 2011-06-04 13:04:46 -07:00
Wayne Davison
cb0db58fb3 Fix unwritable directory issue due to misordered chmod call. 2011-05-30 08:24:27 -07:00
Wayne Davison
0de5157564 Tweak dir xattrs after the writability fudging. 2011-03-26 10:19:04 -07:00
Wayne Davison
78286a03d1 Avoid re-setting (and sending) xattrs on a hard-linked file w/the same xattrs.
Improved the xattrs testing to include hard-linking.
2011-03-26 10:09:20 -07:00
Matt McCutchen
57edc4808f Avoid changing file_extra_cnt during deletion.
The I/O code can receive incremental file-list chunks during deletion,
and their OPT_EXTRA fields would get corrupted when file_extra_cnt is
incremented.

Instead of temporarily enabling uid_ndx to find out whether the user
owns a file, have make_file() set a flag for that purpose.

Applied with a few minor tweaks by Wayne.  Fixes bug 7936.
2011-01-29 22:05:16 -08:00
Wayne Davison
69be312b5e Some minor variable and flag cleanup. 2011-01-29 22:01:37 -08:00
Wayne Davison
d3f5c628d7 Avoid directory permission issues with --fake-super.
Fixes bug 7070.
2011-01-01 18:09:57 -08:00
Wayne Davison
575933e9d0 Itemize xattrs of a missing dir from an alt-dest dir.
Fixes bug 6576.
2011-01-01 13:10:28 -08:00
Wayne Davison
743348e848 Fix issues with unchanged_attrs() for symlinks. 2010-12-18 08:48:07 -08:00
Wayne Davison
2624e005e2 Add --omit-link-times and use CAN_SET_SYMLINK_TIMES less. 2010-08-26 11:12:58 -07:00
Wayne Davison
929002a2d5 Avoid infinite loop if the file's length is negative.
Fixes bug 4664.
2010-08-21 13:48:01 -07:00
Wayne Davison
b3e41255a6 I like braces when multiple lines are indented. 2010-06-26 11:43:09 -07:00
Wayne Davison
54504b8e4f Output list-only sizes using any human-readable setting. 2010-06-26 10:00:29 -07:00
Wayne Davison
e60c8b59fe Fix daemon-filter crash issue (bug 7489). 2010-06-04 23:09:20 -07:00
Matt McCutchen
7a3ce973c3 In "ignoring unsafe symlink" messages, show only the file-list path.
Rsync was showing the full destination path, which was confusing because
nothing is created at that path and was especially bogus in combination
with the source name of a solo file.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506830
2010-04-24 09:51:54 -07:00
Wayne Davison
05c36015f7 More --timeout improvements, especially for the receiving side:
- The receiver now sends keep-alive messages to the generator
  when it is actively doing work and hasn't sent anything
  recently.  This ensures that the generator won't timeout
  if the receiver is working hard.
- The perform_io() code has improved keep-alive participation.
- Allow the sender to send some keep-alive messages, which
  ensures that if it is in a lull, it can probe the socket.
2010-01-02 10:58:39 -08:00
Wayne Davison
92d021488e Improve --timeout method to take into account all I/O that is going on.
The receiving side also switches timeout handling from the receiver to
the generator, which obviates the need for the sender to send any
keep-alive messages at all (for protocol 31 and beyond).  Given this
setup, all keep-alive messages are now sent as empty MSG_DATA messages,
with MSG_NOOP messages only being understood and (when necessary) acted
upon to forward a keep-alive event to an older receiver.  This is both
safer and more compatible with older versions.
2009-12-19 11:00:36 -08:00
Wayne Davison
24079e988f Don't (wrongly) retouch dir permissions with --fake-super.
(Patch from Matt.)
2009-11-28 21:46:42 -08:00
Wayne Davison
23a0d1e200 Get rid of some unneeded externs. 2009-10-27 12:38:30 -07:00
Wayne Davison
4dde3347fb Fix %b and %c so that they count per-transfer bytes again. 2009-10-25 22:27:01 -07:00
Wayne Davison
ee1c00fea8 Pass "new_mode" to set_acl() and change its return values. 2009-09-12 09:27:07 -07:00
Wayne Davison
1a2e41af94 Add support for transferring & setting nsec time values. 2009-09-07 14:11:58 -07:00
Wayne Davison
accc091fe9 Always use lutimes() if it is available. 2009-09-07 13:45:33 -07:00
Wayne Davison
6e310d38fc Have --fake-super turn a symlink into a file when
NO_SYMLINK_XATTRS is defined.
2009-09-02 09:06:29 -07:00
Wayne Davison
8e15bd87dd Better compiling if SUPPORT_LINKS is not defined. 2009-09-02 08:53:40 -07:00
Wayne Davison
c55fb5e1d6 Create non-transferred files in a more atomic manner:
If a symlink, device, special-file, or hard-linked file is replacing
an existing non-directory, the new file is created using a temporary
filename and then renamed into place.  Also changed the handling of
a cluster of hard-linked symlinks/devices/special-files to always
ensure the first item in the cluster is correct, since it doesn't
really save any significant work to try to find an existing correct
item later in the cluster to link with.
2009-08-29 16:18:57 -07:00
Wayne Davison
ce827c3e50 Have the sender use dead time to pad out the file list. 2009-08-22 08:15:26 -07:00