Wayne Davison [Sat, 5 Mar 2005 16:42:52 +0000 (16:42 +0000)]
Don't try to determine the phase we're in by looking at the value
of csum_length -- it might have been computed to be SUM_LENGTH.
Instead, look at the "phase" variable directly.
Wayne Davison [Sat, 5 Mar 2005 04:34:06 +0000 (04:34 +0000)]
Added a hack that uses the ITEM_REPORT_XATTRS bit (which is the old
ITEM_UPDATING bit) to make us compatible when sending/receiving bits
to/from an earlier pre-release.
Wayne Davison [Sat, 5 Mar 2005 04:34:04 +0000 (04:34 +0000)]
Added a hack that sets the ITEM_REPORT_XATTRS bit (which is the old
ITEM_UPDATING bit) when ITEM_TRANSFER or ITEM_LOCAL_CHANGE is set.
This lets us interact compatibly when sending itemized bits to an
earlier pre-release.
Wayne Davison [Sat, 5 Mar 2005 04:34:01 +0000 (04:34 +0000)]
Swapped the bit-values for ITEM_TRANSFER and ITEM_REPORT_XATTRS.
This lets us be more compatible with the earlier pre-releases
with a better heuristic for backward-compatible itemized bits.
Wayne Davison [Sat, 5 Mar 2005 00:21:50 +0000 (00:21 +0000)]
- Make use of the new ITEM_* flags to mention when things were
updated locally instead of being updated remotely.
- Added support for outputting 'a' in the itemized log-output (for
future use in extended-attribute handling).
Wayne Davison [Sat, 5 Mar 2005 00:21:48 +0000 (00:21 +0000)]
- Made the sock_{in,out} variables non-static.
- Added hlink_list, a FIFO list of finished hard-link items.
- Made get_redo_num() check for finished hard-link items and
call the generator when they are found. This ensures that
we finish all the hard-link items by the time the MSG_DONE
is read and returned to the generator.
- Added get_hlink_num() to read the new hlink_list.
Wayne Davison [Sat, 5 Mar 2005 00:21:44 +0000 (00:21 +0000)]
- Changed hlink_list[] to store file-list indexes instead of
pointers.
- Made hard_link_one() non-static so that the generator can call it.
Improved it to do itemized output.
- Replaced do_hard_links() with hard_link_cluster(), which changes
the hard-linking from a post-transfer loop into a per-cluster
operation that occurs incrementally as the transfer updates (or
finds unchanged) one item in the cluster.
Wayne Davison [Sat, 5 Mar 2005 00:21:42 +0000 (00:21 +0000)]
- Updated itemize() to handle sending of hard-link-name info. Made
it non-static so the hard-link code can now output itemized
messages.
- Made the locally-changed items (such as dirs and symlinks) itemize
using a new ITEM_LOCAL_CHANGE flag instead of the (renamed)
ITEM_TRANSFER flag (formerly ITEM_UPDATING).
- Improved the hard-link support by having a cluster of hard-linked
files get processed as soon as we notice that a single item is
already up-to-date, or it succssfully finishes being updated.
- The hard-linking that occurs when using --link-dest will now be
mentioned at higher levels of verbosity IFF %i is in the log-
format.
Wayne Davison [Sat, 5 Mar 2005 00:21:39 +0000 (00:21 +0000)]
- Changed ITEM_UPDATING to ITEM_TRANSFER.
- Added defines ITEM_HARD_LINKED, ITEM_LOCAL_CHANGE,
ITEM_REPORT_XATTRS, and SIGNIFICANT_ITEM_FLAGS.
- Changed the "next" var in struct hlink into an int.
Wayne Davison [Fri, 4 Mar 2005 16:53:26 +0000 (16:53 +0000)]
Moved some code out of the main loop in send_files() into a new
function called read_iflags() (which was made generic enough that
the receiver could use it too). Also call the new maybe_log_item().
Wayne Davison [Fri, 4 Mar 2005 16:07:50 +0000 (16:07 +0000)]
- Replaced log_send() and log_recv() with log_item().
- Made log_formatted() and log_item() take an "hlink" arg that
will be used to pass in a hard-link name for use in %L.
Wayne Davison [Fri, 4 Mar 2005 15:50:22 +0000 (15:50 +0000)]
Transformed the push/pop functions for the redo-list into more
generic flist_num_{push,pop}() functions that can support other
folks caching off file-list index numbers.
Wayne Davison [Fri, 4 Mar 2005 08:58:27 +0000 (08:58 +0000)]
- Got rid of the checking of msg_fd_in in read_timeout() -- it was
only needed back when the generator was reading a separate redo
pipe from the message pipe.
- Fixed a potential data corruption in the data that the generator
is sending: if a message comes in from the receiver, we now make
sure that we can't put the forwarding of this message to the sender
into the middle of a multiplexed-write record that the generator
is trying to flush.
Wayne Davison [Thu, 3 Mar 2005 00:14:35 +0000 (00:14 +0000)]
- Got rid of the SID_* flags -- use the ITEM_* flags directly.
- If --compare-dest find a file that is not the same in attributes,
we need to copy the file.
Wayne Davison [Tue, 1 Mar 2005 01:15:57 +0000 (01:15 +0000)]
- Changed find_colon() into check_for_hostspec(), extending it to
understand the rsync:://HOST:PORT/PATH format, allowing all HOSTs
to be IPv6 literal addresses enclosed in '[' and ']', and changing
it to return the 3 parts of the spec separately (host, port, and
path).
- Relocated the code that handles the sanitation and validation of
the files_from arg in order to make its placement a little more
logical.
- Replaced remote_filesfrom_file with filesfrom_host, which makes
the value of the files_from variable more intuitive.
Wayne Davison [Tue, 1 Mar 2005 00:42:32 +0000 (00:42 +0000)]
Enhanced the option-parsing failure mode to handle the situation
where the parser didn't get a chance to parse the --files-from
option yet, but we still need to know it was there in order to get
the error message back to the client.
Wayne Davison [Sun, 27 Feb 2005 18:24:34 +0000 (18:24 +0000)]
Don't loop forever when the receiver is waiting around to be killed
at EOF -- it should be a rapidly arriving event, so only hang around
for 10 seconds, max., and then go ahead and report the "unexpectedly
closed" error.
Wayne Davison [Sat, 26 Feb 2005 18:03:49 +0000 (18:03 +0000)]
- Moved all the file-deletion code here from flist.c and receiver.c.
- Call maybe_send_keepalive() from delete_in_dir() so that a really
long delete-pass won't timeout.
- Renamed delete_files() -> do_delete_pass().
- Renamed delete_file() -> delete_item().
- Call get_dirlist() with its new arg.
Wayne Davison [Sat, 26 Feb 2005 18:03:46 +0000 (18:03 +0000)]
- Moved file-deletion code into generator.c.
- Made filesystem_dev a global that the generator can set during its
delete pass.
- Fixed an off-by-one boundary check in send_directory().
- Added an arg to get_dirlist() so that delete_in_dir() can call it
efficiently.
Wayne Davison [Sat, 26 Feb 2005 06:52:55 +0000 (06:52 +0000)]
- Moved the initialization of "itemizing", "maybe_PERMS_REPORT", and
"code" from recv_generator() to generate_files() so that they
don't get recomputed for every file (we pass them as args now).
- Allow protocols < 29 to call maybe_send_keepalive() so that we can
try to flush the output buffer if things are slow (though we can't
send a keep-alive packet without protocol_version >= 29).
Wayne Davison [Sat, 26 Feb 2005 04:49:30 +0000 (04:49 +0000)]
The log_delete() function may now be called even when the client is
not getting delete messages, which ensures that the daemon's log-
file output includes all deletions when per-file logging is enabled.