search for: file_sum2

Displaying 18 results from an estimated 18 matches for "file_sum2".

Did you mean: file_sum
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
2002 Feb 11
0
RSYNC 2.5.2 type mismatches in batch.c
...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_batch_delta_file(const void *buff, int bytes_to_write) { static int fdb_delta_open = 1; @@ -528,13 +529,13 @@ exit_cleanup(1); } } -void close_b...
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...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) { - rsyserr(FERROR_XFER, errno, "ftruncate failed o...
2002 Feb 07
1
Latest version of the batch mode cleanup patch
...h file %s read error: %s\n", - rsync_csums_file, strerror(errno)); + filename, strerror(errno)); close(fdb); exit_cleanup(1); } + return bytes_read; } - void read_batch_csum_info(int flist_entry, struct sum_struct *s, int *checksums_match) { @@ -468,11 +465,9 @@ char file_sum2[SUM_LENGTH]; extern int csum_length; - read_batch_csums_file((char *) &file_flist_entry, sizeof(int)); if (file_flist_entry != flist_entry) { - rprintf(FINFO, "file_list_entry NE flist_entry\n"); - rprintf(FINFO, "file_flist_entry = %d flist_entry = %d\n", + rpri...
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
2003 May 20
0
patch for better handling of write failures (disk full)
...le() 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(errno)); - exit_cleanup(RERR_FILEIO);...
2004 Apr 27
1
rsync-2.6.1 close() fixes
...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)); + exit_cleanup(RERR_FILEIO); + }...
2003 May 23
1
PATCH: better handling for write failures (disk full)
...tch 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(errno)); - exit_cleanup(RERR_FILEIO);...
2004 Jun 17
1
[PATCH] make write_batch local
...*************** *** 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) + write_batch_delta_file((char *...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
..._buf(local_socket, (char *)&offset, sizeof(offset)); + percent = offset * 100 / total_size; + } continue; } @@ -307,6 +328,12 @@ if (mapbuf) unmap_file(mapbuf); + if (f_in < 0) { + /* close fast copy handle -goldor */ + close(-f_in); + return 1; + } + read_buf(f_in, file_sum2, sum_len); if (verbose > 2) rprintf(FINFO,"got file_sum\n"); diff -au rsync-3.0.6/sender.c rsync-3.0.6.fast/sender.c --- rsync-3.0.6/sender.c 2009-04-12 22:48:59.000000000 +0300 +++ rsync-3.0.6.fast/sender.c 2009-09-23 22:24:59.000000000 +0300 @@ -35,6 +35,8 @@ extern int allowed...
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...receiver.c Sat Mar 29 11:11:30 2003 +++ receiver.c Sat Mar 29 12:16:23 2003 @@ -230,7 +230,8 @@ OFF_T total_size) { int i; - unsigned int n,remainder,len,count; + struct sum_struct sum; + unsigned int len; OFF_T offset = 0; OFF_T offset2; char *data; @@ -238,9 +239,7 @@ static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; - count = read_int(f_in); - n = read_int(f_in); - remainder = read_int(f_in); + read_sum_head(f_in, &sum); sum_init(); @@ -270,10 +269,10 @@ } i = -(i+1); - offset2 = i*(OFF_T)n; - len = n; - if (i == (int) count-1 && remainder !...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...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 initial_stats; if (verbose > 2) { @@ -416,7 +427,7 @@ if (fd1 != -1 && do_fstat(fd1,&st...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...p, 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_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...p, 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_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...p, 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_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...p, 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_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st...
2003 Mar 23
1
[RFC] dynamic checksum size
...Sat Mar 22 08:23:21 2003 +++ receiver.c.dynsumlen Sat Mar 22 09:47:43 2003 @@ -207,7 +207,8 @@ OFF_T total_size) { int i; - unsigned int n,remainder,len,count; + struct sum_struct sum; + unsigned int len; OFF_T offset = 0; OFF_T offset2; char *data; @@ -215,9 +216,7 @@ static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; - count = read_int(f_in); - n = read_int(f_in); - remainder = read_int(f_in); + read_sum_head(f_in, &sum); sum_init(); @@ -247,10 +246,10 @@ } i = -(i+1); - offset2 = i*(OFF_T)n; - len = n; - if (i == (int) count-1 && remainder !...
2002 Aug 05
5
[patch] read-devices
...xtern 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 header, reading tokens\n"); for (i=re...