Commit Graph

272 Commits

Author SHA1 Message Date
Wayne Davison
3b22184d4c Avoid a non-writable-by-the-user file when copying xattrs.
Fixes part of the problem in bug 5147.
2010-08-21 14:14:31 -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
82b2a31a46 Added an am_receiver variable. 2009-12-19 10:14:49 -08:00
Wayne Davison
d03c0b1ed3 Fix a comment. 2009-11-23 22:45:29 -08:00
Wayne Davison
907e6a32a0 Change the handling of circular buffers to not waste 4 bytes
all the time (we only waste from 1-3 bytes some of the time).
2009-11-23 08:16:18 -08:00
Wayne Davison
23a0d1e200 Get rid of some unneeded externs. 2009-10-27 12:38:30 -07:00
Wayne Davison
d8a7290f86 Give iconvbufs() an ICB_INIT flag. 2009-10-23 22:51:29 -07:00
Wayne Davison
20caffd2b3 A major overhaul of I/O routines, creating perform_io().
Files-from data is now sent as multiplexed I/O so that it can mingle
with any messages (such as debug output).  Requires protocol 31.

Protocol 31 no longer disables output verbosity in a couple instances
that used to cause protocol issues.

Got rid of MSG_* messages that have implied raw data that follows after
them.  We instead send a negative index value as a part of the raw data
stream, which is guaranteed to be output together with the following
data.  This only affects the (in-progress) protocol 31 and the (self-
contained) communication stream from the receiver to the generator.

Added --debug=IO and improved --debug=FLIST.  Some --debug=IO output
requires --msgs2stderr to be used to see it (i.e. sending a message
about sending a message would send another message, ad infinitum).
2009-10-17 00:03:32 -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
ce827c3e50 Have the sender use dead time to pad out the file list. 2009-08-22 08:15:26 -07:00
Wayne Davison
21cddef2b4 Improved the backup code:
- Backups do not interfere with an atomic update (when possible).
- Backing up a file will remove a directory that is in the way
  and visa versa.
- Unify the backup-dir and non-backup-dir code in backup.c.
- Improved the backup tests a little bit.
2009-01-03 12:02:47 -08:00
Wayne Davison
b3bf9b9df9 Update the copyright year. 2009-01-03 10:57:14 -08:00
Wayne Davison
09ca0d15d3 Added init_stat_x() to avoid duplication of acl/xattr init code. 2009-01-03 08:53:59 -08:00
Wayne Davison
08b7c3ed83 Fixed send_protected_args() to send "." in place of an empty arg. 2008-10-11 10:27:16 -07:00
Wayne Davison
8b3e60523a Improved the fix that ensures that the generator gets notified about an
I/O error for the incremental directory that generated the error.  The
PROTOCOL_VERSION was bumped to 31 to implement this.
2008-08-31 09:43:39 -07:00
Wayne Davison
e982d59146 Changed flist_for_ndx() to optionally die with an error
if the index isn't found.
2008-08-14 07:40:56 -07:00
Wayne Davison
f303b749f2 Added logic to the receiving side to ensure that the --delete-during
code will not delete in a directory prior to receiving an I/O error
for that directory (or not receiving it, as the case may be).
2008-08-02 09:14:36 -07:00
Wayne Davison
c9f540f37d Changed the iconv-related message that was being output as the
lone --info=misc2 message into a --debug=iconv message so that
all iconv info will be output when requesting iconv debugging.
2008-08-01 18:15:28 -07:00
Wayne Davison
eabc85ef5e Added a debug-helping option, --msgs2stderr, than should help all
messages to be seen in a situation where rsync is dying (as long
as stderr is a viable output method for the remote rsync).
2008-07-20 20:08:08 -07:00
Wayne Davison
951e826b75 Added the --info=FLAGS an --debug=FLAGS options, which allows
fine-grained output control (in addition to the coarse -v).
2008-07-13 20:51:08 -07:00
Wayne Davison
4337eeb754 A cuple more fixes for --xattrs combined with --backup, this time to
handle when --link-dest is also used.
2008-05-22 07:32:11 -07:00
Wayne Davison
e9489cd6cb Fixed several issues with preserving xattrs when using --backup. 2008-05-17 09:35:46 -07:00
Wayne Davison
7abcfd85b7 Moved declaration of "int i" outside the ifdef in send_protected_args(). 2008-03-16 20:39:16 -07:00
Wayne Davison
53936ef935 Fixed the use of --protect-args (-s) with a daemon. 2008-03-15 11:56:18 -07:00
Wayne Davison
ee39281d14 Fixed the 'T' itemized output for a symlink the right way this time. 2008-03-11 17:35:49 -07:00
Wayne Davison
d3d07a5e86 Include 2008 in the copyright years. 2008-03-01 12:01:41 -08:00
Wayne Davison
0099e42332 Only set FLAG_TIME_FAILED if receiver_symlink_times is set. 2008-02-18 16:48:04 -08:00
Wayne Davison
1ed56a05c2 Extended the protocol-30 info-passing code at startup, and use it to
tell the client if the server can set the times on a symlink (both
the server->client byte and the client->server use of -e).  Make use
of this info to allow the proper output of the 't' flag when rsync
can set the time on a symlink (and we're talking protocol >= 30).
Added output of "[no] symtimes" info in the --version message.
Fixed the itemize.test so that it works when rsync believes that it
can set the time of a symlink, but it can't really do it.
2008-02-18 15:57:59 -08:00
Wayne Davison
87629cf2f6 Re-indent some code in set_file_attrs() to make the flow clearer. 2008-02-07 07:24:58 -08:00
Wayne Davison
83235dbc54 Fixed a case where the receiver indicates a successful update when the
transfer succeeded, but the final rename failed.
2007-12-31 10:31:43 -08:00
Wayne Davison
65b4e4b2a9 Updated indexing for accurate progress and improved raw ndx values.
The sending side now has a sorted file-list in iconv mode so that it
can output progress in sorted order.  Simplified the over-the-wire
index values to ensure both sides will always agree on the values.
Optimized the allocation of the dir_flist->sorted array on the
receiving side with --iconv and incremental recursion.
2007-12-08 11:39:47 -08:00
Wayne Davison
4d7c8e6b76 We now call set_stat_xattr() before set_xattr(). 2007-11-25 13:49:41 -08:00
Wayne Davison
e107b6b122 Fixed a problem with --fake-super not getting the fully tweaked new_mode
value.  Also fixed the removal of rsync-internal xattr values on the
destination files when we aren't copying rsync-internal xattr values.
2007-11-24 10:50:45 -08:00
Wayne Davison
3f0211b63a New logging categories added to allow differentiation between
transfer errors, normal errors, and warnings.  New messages are
translated into old FERROR/FINFO categories for older protocols.
2007-11-22 10:05:36 -08:00
Wayne Davison
b7386d23d4 Avoid verbose output during the forwarding of flist data (for now,
at least).
2007-11-03 07:20:09 +00:00
Wayne Davison
b1eca24226 Avoid a crash if we read an index value without a valid first_flist. 2007-10-31 04:43:19 +00:00
Wayne Davison
4efa11680a We need to provide iconvbufs() anytime ICONV_CONST is defined. 2007-10-25 01:40:17 +00:00
Wayne Davison
2e52ba36cb Added braces to an empty "if" (to avoid any complaints from a compiler
that likes to point out an "if (...)" with a semicolon after it).
2007-10-15 00:16:12 +00:00
Wayne Davison
13710874ce Changed "statx" to "stat_x" to try to work around a build problem on AIX. 2007-09-23 22:19:55 +00:00
Wayne Davison
6191429b50 Added a missing "void" to the arg-spec of setup_iconv(). 2007-09-23 01:18:03 +00:00
Wayne Davison
1b42f628f4 Moved inline functions from rsync.h into ifuncs.h. 2007-09-22 16:52:58 +00:00
Wayne Davison
2ac9793064 - Added new iconvbufs() conversion function that is now used for
our --iconv support.
- Moved the setup of the ic_ndx value to compat.c.
2007-09-18 01:11:57 +00:00
Wayne Davison
2dc7b91dd2 Handle inheritance of SGID bit on dirs marked with FLAG_DIR_CREATED. 2007-09-15 19:58:15 +00:00
Wayne Davison
f9998046a3 Made omit_dir_times a static variable in options.c by encoding
all the time-preserving semantics into preserve_times.
2007-09-01 16:57:01 +00:00
Wayne Davison
8e41b68e8f Tweaking the license text a bit more. 2007-07-10 13:55:49 +00:00
Wayne Davison
6755a7d742 If we get an ndx that is 1 entry prior to an incremental flist's
start, it refers to the file list's parent dir.
2007-07-08 06:25:47 +00:00
Wayne Davison
9decb4d2ef Changed "count" to "used" in struct file_list since there can
be empty items that make the count inaccurate (and the name
somewhat deceiving).
2007-07-07 20:22:05 +00:00
Wayne Davison
4fd842f98d Switching to GPL 3. 2007-07-07 05:33:14 +00:00