[SCM] The rsync repository. - branch b3.0.x updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Mon Jul 4 17:17:08 MDT 2011
The branch, b3.0.x has been updated
via 1916a7a Handle FES_NO_SEND properly on a hard-linked file. Fixes bug 8246.
from 121082f Fix #ifdef in unchanged_attrs(). Fixes bug 8268.
;a=shortlog;h=b3.0.x
- Log -----------------------------------------------------------------
commit 1916a7a2a6c1ed354f827c612cf70f7177a67153
Author: Wayne Davison <wayned at samba.org>
Date: Mon Jul 4 16:02:12 2011 -0700
Handle FES_NO_SEND properly on a hard-linked file.
Fixes bug 8246.
-----------------------------------------------------------------------
Summary of changes:
generator.c | 8 +++++++-
io.c | 8 ++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/generator.c b/generator.c
index 089672e..da6138a 100644
--- a/generator.c
+++ b/generator.c
@@ -2142,10 +2142,16 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
while (1) {
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && (ndx = get_hlink_num()) != -1) {
+ int send_failed = (ndx == -2);
+ if (send_failed)
+ ndx = get_hlink_num();
flist = flist_for_ndx(ndx, "check_for_finished_files.1");
file = flist->files[ndx - flist->ndx_start];
assert(file->flags & FLAG_HLINKED);
- finish_hard_link(file, f_name(file, fbuf), ndx, NULL, itemizing, code, -1);
+ if (send_failed)
+ handle_skipped_hlink(file, itemizing, code, sock_f_out);
+ else
+ finish_hard_link(file, f_name(file, fbuf), ndx, NULL, itemizing, code, -1);
flist->in_progress--;
continue;
}
diff --git a/io.c b/io.c
index 0041000..80cb4b6 100644
--- a/io.c
+++ b/io.c
@@ -177,13 +177,19 @@ static void got_flist_entry_status(enum festatus status, const char *buf)
case FES_SUCCESS:
if (remove_source_files)
send_msg(MSG_SUCCESS, buf, 4, 0);
+ /* FALL THROUGH */
+ case FES_NO_SEND:
+#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links) {
struct file_struct *file = flist->files[ndx - flist->ndx_start];
if (F_IS_HLINKED(file)) {
+ if (status == FES_NO_SEND)
+ flist_ndx_push(&hlink_list, -2); /* indicates a failure follows */
flist_ndx_push(&hlink_list, ndx);
flist->in_progress++;
}
}
+#endif
break;
case FES_REDO:
if (read_batch) {
@@ -195,8 +201,6 @@ static void got_flist_entry_status(enum festatus status, const char *buf)
flist->to_redo++;
flist_ndx_push(&redo_list, ndx);
break;
- case FES_NO_SEND:
- break;
}
}
--
The rsync repository.
More information about the rsync-cvs
mailing list