Commit Graph

6030 Commits

Author SHA1 Message Date
Wayne Davison
8cae71ebc3 For protocol 30, the sender uses the new idev_node() hashfile
routine to keep track of which item is the first one in a particular
hard-link cluster.  It then abbreviates the sending of any follow-on
items in the cluster, reducing transfer bytes.  It also omits the
sending of any dev+inode data to the receiver, saving even more xfer
bytes (since the receiver can associate the entries based on the the
group's index number that is sent when abbreviating an entry).
2006-12-15 22:31:10 +00:00
Wayne Davison
14d776ff0c - The XMIT_SAME_DEV define is now pre-protocol-30 specific.
- Added XMIT_HLINK_FIRST define.
- Added struct idev_node.
- Added F_HL_GNUM() for protocol 30 (used in place of F_HL_IDEV()).
2006-12-15 22:31:07 +00:00
Wayne Davison
c7565dad84 Renamed XMIT_HAS_IDEV_DATA to XMIT_HLINKED. 2006-12-14 22:38:21 +00:00
Wayne Davison
b7cfb9e2c0 Renamed the F_*HLINK* macros to make their purpose clearer. 2006-12-13 15:36:15 +00:00
Wayne Davison
0d152437df Tweaked the option-passing code's delete logic to make it cleaner. 2006-12-13 14:52:59 +00:00
Wayne Davison
6aef83c97d Cast FILE_STRUCT_LEN & EXTRA_LEN to int for rprintf(). 2006-12-12 20:42:06 +00:00
Wayne Davison
225aeca346 Use new BITS_EQUAL() define. 2006-12-12 20:17:05 +00:00
Wayne Davison
0a62f5f382 Added BITS_EQUAL() define. 2006-12-12 20:17:02 +00:00
Wayne Davison
234844915e Removed last reference to "struct hlist". 2006-12-12 15:01:57 +00:00
Wayne Davison
263d3bfb40 Neaten some function formatting. 2006-12-12 14:58:10 +00:00
Wayne Davison
bf466c0f82 Provide alternate F_LENGTH() define for systems with no 64-bit type. 2006-12-12 14:55:21 +00:00
Wayne Davison
8b58407586 Mention fix for -vv --stats. 2006-12-10 21:56:37 +00:00
Wayne Davison
64119c792d Added MSG_CLIENT to the acceptable messages the generator can
get from the receiver.
2006-12-10 14:55:44 +00:00
Wayne Davison
8388e011ae Added MSG_CLIENT to the msgcode enum. 2006-12-10 14:54:08 +00:00
Wayne Davison
0fddbd8a09 A minor format tweak. 2006-12-09 17:35:36 +00:00
Wayne Davison
badb8c24b9 Handle the new output from the hard-link code, including a fix
for a long-standing bug combinding -H with --compare-dest.
2006-12-09 00:24:11 +00:00
Wayne Davison
bfd3137246 - Added FLAG_HLINK_DONE.
- Added BITS_SET() and BITS_SETnUNSET() defines.
- Got rid of unused HL_* defines.
- Got rid of no-longer-needed struct hlist.
- Changed F_HL_LIST() to F_HL_PREV().
- Added F_NOT_HLINK_FIRST() and F_NOT_HLINK_LAST().
- Got rid of WITH_HLINK and WITHOUT_HLINK.
- Got rid of the hlink_pool in the file list.
2006-12-09 00:24:08 +00:00
Wayne Davison
6de0d06259 Got rid of the pool-destroy call since this is not around anymore. 2006-12-09 00:24:05 +00:00
Wayne Davison
89d730a098 Call the new hard-link init functions. 2006-12-09 00:24:01 +00:00
Wayne Davison
18979194cf - Use the revamped hard-link functions.
- Turned maybe_ATTRS_REPORT var into a global for use by hlink.c.
2006-12-09 00:23:58 +00:00
Wayne Davison
aadc84d359 - Revamped the hard-link algorithm to save memory.
- Improved the function names.
- Improved a few variable names.
- Got rid of the "is a hard link" message in favor of the normal status
  messages for files (e.g. --itemize-changes indicates hard-links).
- Fixed a long-standing bug when combining -H with --compare-dest.
- Made sure that code compiles when hard-linking is not available.
2006-12-09 00:23:55 +00:00
Wayne Davison
9d155ecd12 Changed the hlink_pool variable to be a global since only the main
file list ever has a pool for hard-linking.
2006-12-09 00:23:51 +00:00
Wayne Davison
60af946576 Explicitly cast the length values down to an uint32 so that some
compilers don't complain about the value getting smaller.
2006-12-08 21:02:11 +00:00
Wayne Davison
ca0e8296bc Get rid of some signed/unsigned-comparison compiler warnings. 2006-12-08 20:58:51 +00:00
Wayne Davison
c4a28da3ad Use --delete-delay instead of --delete-after. 2006-12-08 20:47:09 +00:00
Wayne Davison
20319fd9ed - The --delete-delay code now does its own output buffering. This
allows us to delay opening a temp file to hold the list of deletions
  until we overflow the buffer (and thus, it's not usually needed).
- Fall back to doing a --delete-after pass if the --delete-delay
  code has a temp-file-writing failure.
2006-12-08 20:42:45 +00:00
Wayne Davison
01d29d7b02 Fixed --delete-delay by making the fprintf() output an unsigned short
for the mode.
2006-12-08 15:10:12 +00:00
Wayne Davison
1183260426 Added missing initialization of new solo_file variable. 2006-12-07 06:22:22 +00:00
Wayne Davison
07613def0a Some minor format tweaks. 2006-12-07 03:31:44 +00:00
Wayne Davison
c2a608d9f1 - Use renamed hard-link defines: F_HL_IDEV() and F_HL_LIST(). 2006-12-07 03:31:41 +00:00
Wayne Davison
49b86442ff - Set "solo_file" bool and use that for improved clarity.
- Use the new device defines: F_RDEV_P(), DEV_MAJOR(), and DEV_MINOR().
2006-12-07 03:31:38 +00:00
Wayne Davison
4785cd43d1 - Use the new device defines: F_RDEV_P(), DEV_MAJOR(), and DEV_MINOR().
- Use renamed F_HL_IDEV() define.
2006-12-07 03:31:34 +00:00
Wayne Davison
e238c9977d Use the new device defines: F_RDEV_P(), DEV_MAJOR(), and DEV_MINOR(). 2006-12-07 03:31:31 +00:00
Wayne Davison
b37b7c9949 - Added a signed number to the flist_extras union.
- Renamed F_IDEV() to F_HL_IDEV() and F_HLIST() to F_HL_LIST().
- Changed device defines to be: F_RDEV_P(), DEV_MAJOR(), and DEV_MINOR().
2006-12-07 03:31:28 +00:00
Wayne Davison
f7d7fb381d Improved the format of the debug output for mknod(). 2006-12-07 02:37:42 +00:00
Wayne Davison
3481bdf493 Mention waitpid() fix (which helps pre-xfer exec). 2006-12-06 17:27:47 +00:00
Wayne Davison
d365e22967 The wait_process() call now handles EINTR. 2006-12-06 17:21:59 +00:00
Wayne Davison
d02363609a If the pre-xfer exec failed with -1, output the strerror()
from the waitpid() call.
2006-12-06 16:56:19 +00:00
Wayne Davison
1e1ca25343 #ifdef calls to hard-link functions. 2006-12-06 01:32:17 +00:00
Wayne Davison
a2ebbffca7 - Make some char* pointers const.
- Tweaked a couple variable names.
- Changed the #ifdefs to not define any hard-link functions
  when hard-linking is disabled.
2006-12-06 01:26:11 +00:00
Wayne Davison
0395130c06 Changed i -> ndx in several variables. 2006-12-06 00:55:33 +00:00
Wayne Davison
b8c167e804 F_SUM() needed to use HLINK_BUMP(). 2006-12-06 00:52:34 +00:00
Wayne Davison
17026f2741 Handle the FLAG_LENGTH64 flag in unmake_file(). 2006-12-05 17:45:29 +00:00
Wayne Davison
112d728f48 Use the latest F_*() accessors. 2006-12-05 15:59:58 +00:00
Wayne Davison
96293cf991 Saved 9 more bytes per file in a typical transfer by making the length
32 bits by default, by removing the basename pointer, and by making the
mode value a unsigned short.
2006-12-05 15:59:53 +00:00
Wayne Davison
f0fbf1d670 Changed flist_extra_ndx into flist_extra_cnt. 2006-12-05 15:59:49 +00:00
Wayne Davison
7a821d518b Tweaked some externs. 2006-12-05 15:59:46 +00:00
Wayne Davison
663b2857eb Use new send_msg_int() function. 2006-12-04 02:07:37 +00:00
Wayne Davison
155d9206a4 Added send_msg_int() function. 2006-12-04 02:07:30 +00:00
Wayne Davison
6b2a3d5de6 Moved an extern. 2006-12-03 07:58:12 +00:00