The Samba-Bugzilla – Attachment 2142 Details for
Bug 4079
rsync fails with --inplace, --link-dest and --no-whole-file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix --inplace when basis file doesn't match dest file
inplace-with-dest.patch (text/plain), 1.43 KB, created by
Wayne Davison
on 2006-09-17 18:18:20 UTC
(
hide
)
Description:
Fix --inplace when basis file doesn't match dest file
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2006-09-17 18:18:20 UTC
Size:
1.43 KB
patch
obsolete
>--- receiver.c 30 Jun 2006 15:52:52 -0000 1.183 >+++ receiver.c 17 Sep 2006 23:16:21 -0000 >@@ -57,6 +57,8 @@ extern struct filter_list_struct server_ > > static struct bitbag *delayed_bits = NULL; > static int phase = 0; >+/* We're either updating the basis file or an identical copy: */ >+static int updating_basis; > > > /* >@@ -216,7 +218,7 @@ static int receive_data(int f_in, char * > sum_update(map, len); > } > >- if (inplace) { >+ if (updating_basis) { > if (offset == offset2 && fd != -1) { > OFF_T pos; > if (flush_write_file(fd) < 0) >@@ -241,7 +243,7 @@ static int receive_data(int f_in, char * > goto report_write_error; > > #ifdef HAVE_FTRUNCATE >- if (inplace && fd != -1) >+ if (updating_basis && fd != -1) > ftruncate(fd, offset); > #endif > >@@ -360,6 +362,8 @@ int recv_files(int f_in, struct file_lis > if (delay_updates) > delayed_bits = bitbag_create(flist->count); > >+ updating_basis = inplace; >+ > while (1) { > cleanup_disable(); > >@@ -459,6 +463,7 @@ int recv_files(int f_in, struct file_lis > fnamecmp = get_backup_name(fname); > break; > case FNAMECMP_FUZZY: >+ updating_basis = 0; > if (file->dirname) { > pathjoin(fnamecmpbuf, MAXPATHLEN, > file->dirname, xname); >@@ -467,6 +472,7 @@ int recv_files(int f_in, struct file_lis > fnamecmp = xname; > break; > default: >+ updating_basis = 0; > if (fnamecmp_type >= basis_dir_cnt) { > rprintf(FERROR, > "invalid basis_dir index: %d.\n",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4079
:
2142
|
2143