search for: sum_struct

Displaying 20 results from an estimated 32 matches for "sum_struct".

Did you mean: mm_struct
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...*sums; /**< points to info for each chunk */ }; --- proto.h Sat Mar 29 12:18:02 2003 +++ proto.h Sat Mar 29 12:15:38 2003 @@ -91,6 +91,7 @@ struct file_list *flist_new(void); void flist_free(struct file_list *flist); char *f_name(struct file_struct *f); +void write_sum_head(int f, struct sum_struct *sum); void recv_generator(char *fname, struct file_list *flist, int i, int f_out); void generate_files(int f,struct file_list *flist,char *local_name,int f_recv); int main(int argc, char *argv[]); @@ -190,6 +191,7 @@ int report); void sig_int(void); void finish_transfer(char *fname, c...
2002 Apr 23
1
patch: timeout problem solved
...aNet Administration | sn@parlanet.de | +49 431 988-1260 -------------- next part -------------- --- rsync-2.5.5/generator.c Mon Mar 25 06:54:31 2002 +++ rsync-2.5.5-gen/generator.c Tue Apr 23 01:51:32 2002 @@ -102,28 +102,12 @@ /* send a sums struct down a fd */ -static void send_sums(struct sum_struct *s, int f_out) +static void send_null_sums(int f_out) { - if (s) { - size_t i; - - /* tell the other guy how many we are going to be - doing and how many bytes there are in the last - chunk */ - write_int(f_out, s->count); - write_int(f_out, s->n); - write_int(f_out, s->remai...
2003 Mar 23
1
[RFC] dynamic checksum size
...patch lays the groundwork. It makes the checksum length a per-file attribute alongside the block size. This required a protocol bump and reaching into almost every routine that touches block checksums. I found that there was a great deal of code duplication involved with reading and writing the sum_struct fields. I have eliminated the duplication by consolidating that transmission in the new (read|write)_sum_head functions. A added bonus is that write_sum_head replaces the send_null_sums function. The Adleresque checksum1 is in no way affected. The varsumlen patch builds on that groundwork by imp...
2013 Jul 29
2
Improve --inplace updates on pathological inputs
Hi, I recently came across a situation where "rsync --inplace" performs very poorly. If both the source and destination files contain long sequences of identical blocks, but not necessarily in the same location, the sender can spend an inordinate amount of CPU time finding matching blocks. In my case, I came across this problem while backing up multi-hundred-gigabyte MySQL database
2003 Oct 05
2
Possible security hole
Maybe security related mails should be sent elsewhere? I didn't notice any so here it goes: sender.c:receive_sums() s->count = read_int(f); .. s->sums = (struct sum_buf *)malloc(sizeof(s->sums[0])*s->count); if (!s->sums) out_of_memory("receive_sums"); for (i=0; i < (int) s->count;i++) { s->sums[i].sum1 = read_int(f);
2002 Mar 23
1
why variable last_i is needed in match.c rsync source ?
Hi all I see the rsync source and rsync makes hashing table and search hashing table tag_table to find the index of array struct sum_buf , which is a element of struct sum_struct. According to the source code, variable last_i is used to encourage adjacent matches allowing the RLL coding of the output to work more efficiently. Why last_i makes more efficiency? I can't understanding what last_i makes and when last_i is used. In file match.c below code follows. In...
2004 May 10
2
read error produces null-byte-filled destination file
I've run into a bug in the IO handling when reading a file. Suppose I have a file that lives on an NFS filesystem. That filesystem is NOT being exported with auth=0 permissions. So, if I try to access a file as root, it successfully opens the file, but subsequent reads fail with EACCES. This produces a destination file full of null bytes. I noticed this with 2.5.7, but checked 2.6.2 as
2002 Mar 12
2
Compile error
Hi, I tried to compile rsync2.5.3 on Solaris5.7, and I still got the same errors as Solaris5.8, can you please help me to look at the problem? I got error messages: Configure was run successfully, then I ran make, I got: "batch.c", line 408: operands have incompatible types: pointer to unsigned long ":" pointer to unsigned int cc: acomp failed for batch.c ***
2004 Jun 17
1
[PATCH] make write_batch local
...53 **** --- 48,54 ---- extern int local_server; extern int read_batch; extern int write_batch; + extern int read_batch; extern int list_only; extern int only_existing; extern int orig_umask; *************** *** 124,132 **** /* * set (initialize) the size entries in the per-file sum_struct ! * calulating dynamic block ans checksum sizes. * ! * This is only called from generate_and_send_sums() but is a seperate * function to encapsulate the logic. * * The block size is a rounded square root of file length. --- 125,133 ---- /* * set (initialize) the size entries...
2003 Jun 10
1
Red Hat rsync - 'sign' patch
...2.5.6-sign.patch - which I have attached. AFAICT, back in the vicinity of January 2002, a patch (call this patch 'A') was developed to close an 'rsync remote hole' - the patch switched variables in 'sum_struct' to size_t. According to some documentation I have read, that patch itself introduced some comparisons between signed and unsigned, which "can cause rsync to not work properly". The patch I have included...
2002 Aug 05
5
[patch] read-devices
...st_match+j,(double)n1); + map_ptr(buf,last_match+j,n1); + if (buf->m_len==0) break; + sum_update(buf->m_ptr,buf->m_len); } - if (i >= 0) last_match = offset + s->sums[i].len; else last_match = offset; @@ -127,45 +128,41 @@ } static void hash_search(int f,struct sum_struct *s, - struct map_struct *buf,OFF_T len) + struct map_struct *buf) { - OFF_T offset, end; + OFF_T offset; int j,k, last_i; char sum2[SUM_LENGTH]; uint32 s1, s2, sum; - schar *map; /* last_i is used to encourage adjacent matches, allowing the RLL coding of the output to work more...
2004 Jul 12
1
Core dump - Can not sync big data folders of size 800 GB
Hi, I was trying to synchronize data sitting on our Sun Solaris 8 server with data size of about 800 GB to a remote Linux server in our LAN. Either the rsync process hangs for ever else I get "core dump" after about 15 minutes of time on the source host (solaris 8 server). I used rsync 2.6.2 using the basic command options as shown below # rsync -avz -e rsh <source folder
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch? Thanks for the reminder. I've just committed Jos's rsync+ patch onto the "branch_mbp_rsyncplus_merge" branch. If it works OK and nobody screams I will move it across onto the main tree tomorrow or Wednesday. I see the patch doesn't add documentation about the new options to the man page, so we should fix that in the future.
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...ork diff receiver.c --- receiver.c 2004-02-09 15:42:40.000000000 -0500 +++ receiver.c 2004-02-09 15:42:40.000000000 -0500 @@ -237,10 +237,11 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname, - OFF_T total_size) + OFF_T total_size,char *md4) { int i; struct sum_struct sum; + struct mdfour mdfour_data; unsigned int len; OFF_T offset = 0; OFF_T offset2; @@ -250,6 +251,8 @@ char *map=NULL; read_sum_head(f_in, &sum); + if (md4) + mdfour_begin(&mdfour_data); sum_init(); @@ -269,6 +272,8 @@ cleanup_got_literal = 1; sum_upd...
2004 Jan 17
1
--delete-sent-files (AKA --move-files)
...ac; } Index: proto.h --- proto.h 15 Jan 2004 07:42:23 -0000 1.172 +++ proto.h 17 Jan 2004 05:04:55 -0000 @@ -193,6 +193,7 @@ int set_perms(char *fname,struct file_st void sig_int(void); void finish_transfer(char *fname, char *fnametmp, struct file_struct *file); void read_sum_head(int f, struct sum_struct *sum); +void successful_send(int i); void send_files(struct file_list *flist, int f_out, int f_in); int try_bind_local(int s, int ai_family, int ai_socktype, const char *bind_address); Index: receiver.c --- receiver.c 15 Jan 2004 07:42:25 -0000 1.63 +++ receiver.c 17 Jan 2004 05:04:55 -0000...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...&& (!am_sender || remote_filesfrom_file)) { if (remote_filesfrom_file) { args[ac++] = "--files-from"; patchwork diff proto.h --- proto.h 2004-02-23 10:22:51.000000000 -0500 +++ proto.h 2004-02-23 10:22:51.000000000 -0500 @@ -93,6 +93,12 @@ void write_sum_head(int f, struct sum_struct *sum); void recv_generator(char *fname, struct file_struct *file, int i, int f_out); void generate_files(int f, struct file_list *flist, char *local_name); +char* make_hash_name(struct file_struct *file); +void kill_hashfile(struct hashfile_struct *hashfile); +void kill_hashfiles(struct hashfile_...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...&& (!am_sender || remote_filesfrom_file)) { if (remote_filesfrom_file) { args[ac++] = "--files-from"; patchwork diff proto.h --- proto.h 2004-02-17 10:36:44.000000000 -0500 +++ proto.h 2004-02-17 10:43:31.000000000 -0500 @@ -93,6 +93,12 @@ void write_sum_head(int f, struct sum_struct *sum); void recv_generator(char *fname, struct file_struct *file, int i, int f_out); void generate_files(int f, struct file_list *flist, char *local_name); +char* make_hash_name(struct file_struct *file); +void kill_hashfile(struct hashfile_struct *hashfile); +void kill_hashfiles(struct hashfile_...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...&& (!am_sender || remote_filesfrom_file)) { if (remote_filesfrom_file) { args[ac++] = "--files-from"; patchwork diff proto.h --- proto.h 2004-02-23 10:22:51.000000000 -0500 +++ proto.h 2004-02-23 11:06:03.000000000 -0500 @@ -93,6 +93,12 @@ void write_sum_head(int f, struct sum_struct *sum); void recv_generator(char *fname, struct file_struct *file, int i, int f_out); void generate_files(int f, struct file_list *flist, char *local_name); +char* make_hash_name(struct file_struct *file); +void kill_hashfile(struct hashfile_struct *hashfile); +void kill_hashfiles(struct hashfile_...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...&& (!am_sender || remote_filesfrom_file)) { if (remote_filesfrom_file) { args[ac++] = "--files-from"; patchwork diff proto.h --- proto.h 2004-02-16 10:24:38.000000000 -0500 +++ proto.h 2004-02-16 10:18:14.000000000 -0500 @@ -93,6 +93,12 @@ void write_sum_head(int f, struct sum_struct *sum); void recv_generator(char *fname, struct file_struct *file, int i, int f_out); void generate_files(int f, struct file_list *flist, char *local_name); +char* make_hash_name(struct file_struct *file); +void kill_hashfile(struct hashfile_struct *hashfile); +void kill_hashfiles(struct hashfile_...
2002 Feb 07
1
Latest version of the batch mode cleanup patch
...50,14 +447,14 @@ if (bytes_read == -1) { rprintf(FERROR, "Batch 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"); - rpri...