search for: file_sum1

Displaying 17 results from an estimated 17 matches for "file_sum1".

Did you mean: file_sum
2002 Feb 11
0
RSYNC 2.5.2 type mismatches in batch.c
...((char *) &file_chunk_ct, + read_batch_csums_file( &file_chunk_ct, sizeof(int)); *checksums_match = 1; for (i = 0; i < file_chunk_ct; i++) { - read_batch_csums_file((char *) &file_sum1, + read_batch_csums_file( &file_sum1, sizeof(uint32)); read_batch_csums_file(file_sum2, csum_length); @@ -498,7 +499,7 @@ } -void write_batch_delta_file(char *buff, int bytes_to_write) +void write...
2003 Mar 22
2
[RFC] protocol version
I'm in the midst of coding a patch set for consideration that will bump the protocol version and have a couple of observations. The current minimum backwards-compatible protocol is 15 but we have code that checks for protocol versions as old as 12. If someone else doesn't beat me to it i'm considering cleaning out the pre-15 compatibility code. A backwards compatibility patch could
2003 May 20
0
patch for better handling of write failures (disk full)
...also using John Van Essen's write_file() patch from: http://lists.samba.org/pipermail/rsync/2003-April/010511.html diff -Nru a/rsync/receiver.c b/rsync/receiver.c --- a/rsync/receiver.c Tue May 20 08:56:43 2003 +++ b/rsync/receiver.c Tue May 20 08:56:43 2003 @@ -214,6 +214,7 @@ static char file_sum1[MD4_SUM_LENGTH]; static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; + int discard = 0; count = read_int(f_in); n = read_int(f_in); @@ -240,7 +241,9 @@ if (fd != -1 && write_file(fd,data,i) != i) { rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(...
2003 May 23
1
PATCH: better handling for write failures (disk full)
...sing John Van Essen's write_file() patch from: http://lists.samba.org/pipermail/rsync/2003-April/010511.html John diff -Nru a/rsync/receiver.c b/rsync/receiver.c --- a/rsync/receiver.c Tue May 20 08:56:43 2003 +++ b/rsync/receiver.c Tue May 20 08:56:43 2003 @@ -214,6 +214,7 @@ static char file_sum1[MD4_SUM_LENGTH]; static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; + int discard = 0; count = read_int(f_in); n = read_int(f_in); @@ -240,7 +241,9 @@ if (fd != -1 && write_file(fd,data,i) != i) { rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(...
2006 Jan 12
1
Checksum of a file
Hi all, With reference to the mail subjected : IO Timeout Error in file less than 3 MB, thanks to Wayne Davison and Tony for having suggested the changes to be done. I have moved to rsync version 2.6.6 from the 2.4 series. As per my project requirement, i need to know the checksum of the file being synced. For this purpose i tried debugging the code. I understand that rsync breaks the
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...vices; extern int preserve_xattrs; extern int basis_dir_cnt; extern int make_backups; @@ -165,6 +166,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, const char *fname, int fd, OFF_T total_size) { + STRUCT_STAT st; static char file_sum1[MAX_DIGEST_LEN]; static char file_sum2[MAX_DIGEST_LEN]; struct map_struct *mapbuf; @@ -285,10 +287,14 @@ goto report_write_error; #ifdef HAVE_FTRUNCATE - if (inplace && fd != -1 - && ftruncate(fd, offset) < 0) { - rsyse...
2002 Jun 02
1
batch diffs
I needed a tool to produce diffs of binary volumes, and to apply them as patches accordingly. So I tried the 'batch mode' that was added to rsync, but it invariably segfaulted on reading the batches... $ sh foo.rsync_argvs foo.rsync_argvs: line 1: 8971 Segmentation fault rsync -a -v --stats --read-batch=foo ${1:-FOO} rsync: error writing 64 unbuffered bytes - exiting: Broken pipe
2004 Apr 27
1
rsync-2.6.1 close() fixes
...+269,12 @@ static int receive_data(int f_in,struct exit_cleanup(RERR_FILEIO); } + if (do_fsync && (fd != -1) && (fsync(fd) != 0)) { + rprintf(FERROR, "fsync failed on %s: %s\n", + full_fname(fname), strerror(errno)); + exit_cleanup(RERR_FILEIO); + } + sum_end(file_sum1); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); @@ -458,7 +465,11 @@ int recv_files(int f_in,struct file_list if (fd1 != -1) { close(fd1); } - close(fd2); + if (close(fd2) != 0) { + rprintf(FERROR, "close failed on %s: %s\n", + full_fname(fnametmp), strerror(errno)); + e...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...rprintf(FERROR, "write failed on %s: %s\n", @@ -296,6 +301,8 @@ see_token(map, len); sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -316,6 +323,9 @@ } sum_end(file_sum1); + if (md4) { + mdfour_result(&mdfour_data, (unsigned char*)md4); + } read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -351,6 +361,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initi...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...rprintf(FERROR, "write failed on %s: %s\n", @@ -243,6 +248,8 @@ see_token(map, len); sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_sta...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...rprintf(FERROR, "write failed on %s: %s\n", @@ -243,6 +248,8 @@ see_token(map, len); sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_sta...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...rprintf(FERROR, "write failed on %s: %s\n", @@ -243,6 +248,8 @@ see_token(map, len); sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_sta...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...rprintf(FERROR, "write failed on %s: %s\n", @@ -243,6 +248,8 @@ see_token(map, len); sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_sta...
2010 Jun 15
3
about rsyncing of block devices
Hiya, I can see it's a regular subject on this list. I, like others wanted to use rsync to synchronise two block devices (as it happens one lvm volume and one nbd device served by qemu-img on a remote host from a qcow2 disk image so that I can keep the old versions) As I couldn't find any report of it being done successfully, I'm just sharing my findings as it might benefit others.
2004 Jun 17
1
[PATCH] make write_batch local
...er.c 17 Jun 2004 04:01:58 -0000 *************** *** 46,51 **** --- 46,52 ---- extern int module_id; extern int ignore_errors; extern int orig_umask; + extern int write_batch; extern int keep_partial; extern int checksum_seed; *************** *** 279,284 **** --- 280,287 ---- sum_end(file_sum1); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); + if (write_batch) + write_batch_delta_file(file_sum2, MD4_SUM_LENGTH); if (verbose > 2) { rprintf(FINFO,"got file_sum\n"); } *************** *** 334,339 **** --- 337,345 ---- continue; } + if (write_batch) +...
2002 Feb 07
1
Latest version of the batch mode cleanup patch
...ile_flist_entry = %d flist_entry = %d\n", + rprintf(FINFO, "file_flist_entry (%d) != flist_entry (%d)\n", file_flist_entry, flist_entry); close(fdb); exit_cleanup(1); @@ -488,31 +483,33 @@ read_batch_csums_file(file_sum2, csum_length); if ((s->sums[i].sum1 != file_sum1) || - (memcmp - (s->sums[i].sum2, file_sum2, - csum_length) != 0)) { + (memcmp(s->sums[i].sum2, file_sum2, csum_length) + != 0)) { *checksums_match = 0; } } /* end for */ } - } void write_batch_delta_file(char *buff, int bytes_to_write) {...
2002 Aug 05
5
[patch] read-devices
...Aug 5 10:05:15 2002 @@ -35,8 +35,9 @@ extern char *tmpdir; extern char *compare_dest; extern int make_backups; extern char *backup_suffix; +extern int read_devices; static struct delete_list { DEV64_T dev; INO64_T inode; @@ -212,16 +213,17 @@ OFF_T offset2; char *data; static char file_sum1[MD4_SUM_LENGTH]; static char file_sum2[MD4_SUM_LENGTH]; - char *map=NULL; - + rprintf(FINFO, "#ET#<receive_data for %s\n", fname); + count = read_int(f_in); n = read_int(f_in); remainder = read_int(f_in); sum_init(); + rprintf(FINFO, "#ET#<receive_data: got hea...