Commit Graph

121 Commits

Author SHA1 Message Date
Wayne Davison
18070203c2 Replace another assert with a descriptive error. 2010-06-26 16:06:09 -07:00
Wayne Davison
db22e586da Make sure our idev_find() hashtable use is right. 2010-05-29 09:21:30 -07:00
Wayne Davison
c3541d30b6 Turn an assert into two more descriptive errors. 2010-05-29 08:52:59 -07:00
Wayne Davison
23a0d1e200 Get rid of some unneeded externs. 2009-10-27 12:38:30 -07:00
Wayne Davison
b15fa9bd7b Avoid an dry-run error trying to stat a prior hard-link
file that hasn't really been created.
2009-09-05 08:18:35 -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
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
315c2152d0 Initialize xattr data in a couple spots in the hlink code, which avoids
a crash when the xattr pointer's memory happens to start out non-zero.
Also fixed the itemizing of an alt-dest file's xattrs when hard-linking.
2008-09-24 08:00:50 -07:00
Wayne Davison
5dd14f0c33 Split up the ifuncs.h file into 3 .h files. 2008-09-01 19:11:36 -07:00
Wayne Davison
adc2476fa2 Output numbers in 3-digit groups by default (e.g. 1,234,567).
Also improved the human-readable output functions, including
adding the ability to output negative numbers.
2008-09-01 13:27:11 -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
0b7bce2c7b Make sure that the hlink node->data allocation doesn't fail. 2008-08-08 07:48:41 -07:00
Wayne Davison
b791d6802b Include the array-size in array externs so that IBM's code-checker
can do more checking for us.
2008-07-20 22:41:29 -07:00
Wayne Davison
ced4fd8993 Fixed a bug in match_hard_links() where an empty directory would try
to allocate 0 bytes of memory (which can fail on some OSes).
2008-07-20 20:34:06 -07:00
Wayne Davison
56ac812359 A few more HLINK debug messages. 2008-07-20 13:54:53 -07:00
Wayne Davison
28a5b78c6f Improved the hard-link logging. 2008-07-18 17:35:22 -07:00
Wayne Davison
0c096e29aa Added some HLINK debugging output and enabled it for hardlink tests. 2008-07-17 07:43:11 -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
fdf74bede0 - Changed prev_name into a buffer so that there is no chance that its
contents can be overwritten by other calls to f_name().
- Changed an hlink assert into a check that provides more debug info.
2008-04-28 21:17:36 -07:00
Wayne Davison
876ad10ccc Fixed a crash if a non-incremental-recursion transfer has a
skipped file in a set of hard-links.
2008-04-27 18:45:13 -07:00
Wayne Davison
487cb52615 Fixed the discovery of a prior finished hard-link when the entry
is old enough that it is no longer in the flist data.
2008-03-26 16:12:39 -07:00
Wayne Davison
c9b62cf375 Fixed hard-linking when some of the files can get skipped. This adds
the FLAG_SKIP_HLINK flag, which gets set on any hard-linked file that
the user wants to skip (e.g. via --ignore-existing, --append, etc.).
The code in hlink.c now deals with the skipped files instead of
triggering an assert() error.
2008-03-16 19:47:35 -07:00
Wayne Davison
d3d07a5e86 Include 2008 in the copyright years. 2008-03-01 12:01:41 -08:00
Wayne Davison
e96c7777d7 Fixed return code from hard_link_one() when not verbose. 2008-02-06 16:06:33 -08:00
Wayne Davison
5288be3af7 Some minor tweaks:
- Improved some comments in hlink.c.
- Changed "the" to "a" in rsyncd.conf.yo.
- Improved the PATCH.name filtering loop in patch-update.
2007-12-31 20:40:51 -08:00
Wayne Davison
eb67a6909b Don't try to process hard-link data in list-only mode. 2007-11-29 10:27:16 -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
f7a76b9c45 Some changes to allow an unsorted file list even if the iconv option
was disabled via configure.
2007-11-06 15:25:02 +00:00
Wayne Davison
1aa343e89c Make last fix even better. 2007-10-21 21:52:25 +00:00
Wayne Davison
5ed353a881 Avoid dropping a hard-linked itemized output with -ii. 2007-10-21 16:50:31 +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
c980db5f08 - Simplified the flist-spanning gnum logic in match_gnums().
- Don't use hlink_flist in hard_link_check().
- Made the prev_name logic in hard_link_check() better.
- Added an "ndx" arg to the finish_hard_link() call.  Also, set the
  prev value of any prior entries to the first finished item (which
  ensures that any item that follows a re-shuffled item (which was
  waiting for a transferred file to finish) can find the FIRST+DONE
  item.
2007-09-10 06:15:25 +00:00
Wayne Davison
0eeb9f5481 If we turn off FLAG_HLINKED, set FLAG_HLINK_DONE so that any
file-entry values affected by HLINK_BUMP() stay put.
2007-09-04 06:53:47 +00:00
Wayne Davison
d4d6646aae Changes to allow hard-linking to work in inc_recurse mode. 2007-09-03 21:21:17 +00:00
Wayne Davison
626065702f Removed the old version of the hashtable functions and updated
the code to use the structures and functions calls.
2007-09-03 04:59:12 +00:00
Wayne Davison
8e41b68e8f Tweaking the license text a bit more. 2007-07-10 13:55:49 +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
Wayne Davison
3d0a159d96 Added a comment to a shared iterator to avoid a warning from IBM's checker. 2007-05-22 05:58:59 +00:00
Wayne Davison
332cf6df7c The --iconv option has now made it to the trunk. 2007-04-26 05:53:13 +00:00
Wayne Davison
1c3344a105 The ACL support has arrived! This version has a brand new protocol
that makes it incompatible with all prior versions.  A patch will be
provided to allow talking with older (patched) rsync versions.
2007-03-11 00:13:34 +00:00
Wayne Davison
ba2133d6ad Further modifications to the copyright comment section. 2007-02-04 14:54:58 +00:00
Wayne Davison
3ac830b9f9 A few minor tweaks to handle the newest variable names. 2006-12-28 07:54:34 +00:00
Wayne Davison
719985cb9c A few more minor tweaks. 2006-12-17 04:42:33 +00:00
Wayne Davison
007996b40d Got rid of the code that sorted based on struct idev objects since
we always use a hardlinked group-number now.
2006-12-17 00:40:39 +00:00
Wayne Davison
c905bf37f6 Added a simple hashtable routine for hashing st_dev and st_ino info
on the sending side, and the support routines for the receiving side
that handle using a "group number" for each hard-link cluster rather
than having to manage a pool of dev+inode data. (For protocol 30)
2006-12-15 22:31:13 +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
c2a608d9f1 - Use renamed hard-link defines: F_HL_IDEV() and F_HL_LIST(). 2006-12-07 03:31:41 +00:00