search for: write_sum_head

Displaying 16 results from an estimated 16 matches for "write_sum_head".

2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...2_length */ struct sum_buf *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 finis...
2003 Mar 23
1
[RFC] dynamic checksum size
...most 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 implementing a simple heuristic to generate the per-file sum2 lengths. It remains two bytes until the file is 8193 blocks at which it increments and continues inc...
2004 Jun 17
1
[PATCH] make write_batch local
...hecksums that describe a buffer * * Generate approximately one checksum every block_len bytes. */ ! static void generate_and_send_sums(struct map_struct *buf, size_t len, int f_out) { ! size_t i; struct sum_struct sum; OFF_T offset = 0; sum_sizes_sqroot(&sum, len); write_sum_head(f_out, &sum); for (i = 0; i < sum.count; i++) { unsigned int n1 = MIN(len, sum.blength); --- 228,253 ---- * Generate and send a stream of signatures/checksums that describe a buffer * * Generate approximately one checksum every block_len bytes. + * + * The flist_idx arg...
2004 Jan 25
2
scan for first existing hard-link file
...ame, struct } if (statret == -1) { + if (preserve_hard_links && file->link_u.links + && !(file->flags & FLAG_HLINK_LAST)) { + hlink_list[file->F_INDEX] = file->F_NEXT; + return; + } if (errno == ENOENT) { write_int(f_out,i); if (!dry_run) write_sum_head(f_out, NULL); @@ -455,6 +462,11 @@ void recv_generator(char *fname, struct } /* now pretend the file didn't exist */ + if (preserve_hard_links && file->link_u.links + && !(file->flags & FLAG_HLINK_LAST)) { + hlink_list[file->F_INDEX] = file->F_NE...
2007 Oct 14
3
DO NOT REPLY [Bug 5020] New: hang using RSYNC_CONNECT_PROG
...=0x56eba0 "", len=4092) at io.c:1442 #2 0x000000000042252a in io_flush (flush_it_all=0) at io.c:1519 #3 0x000000000042269d in writefd (fd=4, buf=0x7fffd059bea4 "�\177", len=0) at io.c:1551 #4 0x0000000000422b9b in write_int (f=9, x=-514) at io.c:1567 #5 0x0000000000422d0f in write_sum_head (f=9, sum=0x569480) at io.c:1343 #6 0x000000000040dd08 in recv_generator (fname=0x7fffd059e230 "pool/main/d/devhelp/libdevhelp-1-dev_0.16.1-1_amd64.deb", file=0x2b84da9f8ec0, ndx=28095, itemizing=1, code=FLOG, f_out=8) at generator.c:1788 #7 0x000000000040e9bb in generate_files (f_...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...copy of 0 length files -goldor */ + mbuf = map_file(fd, 0, 0, s->blength); + rprintf(FINFO,"sending file descriptor %d\n", mbuf->fd); + send_fd(local_socket, mbuf->fd); + } + write_ndx_and_attrs(f_out, ndx, iflags, fname, file, fnamecmp_type, xname, xlen); write_sum_head(f_xfer, s); @@ -333,7 +345,18 @@ set_compression(fname); - match_sums(f_xfer, s, mbuf, st.st_size); + if (local_server && local_socket && s->count == 0) { + OFF_T offset = 0; + while (offset < st.st_size) { + read_buf(local_socket, (char *)&offset, sizeof(o...
2005 Mar 21
4
Patch: Offline transfer mode
...y_run) { if (!am_server && verbose) /* log the transfer */ rprintf(FINFO, "%s\n", safe_fname(fname2)); - write_int(f_out, i); + write_int(f_alt, i); continue; } @@ -224,8 +238,8 @@ safe_fname(fname), (double)st.st_size); } - write_int(f_out, i); - write_sum_head(f_out, s); + write_int(f_alt, i); + write_sum_head(f_alt, s); if (verbose > 2) { rprintf(FINFO, "calling match_sums %s\n", @@ -237,7 +251,7 @@ set_compression(fname); - match_sums(f_out, s, mbuf, st.st_size); + match_sums(f_alt, s, mbuf, st.st_size); log_send(fil...
2004 Aug 02
4
reducing memmoves
Attached is a patch that makes window strides constant when files are walked with a constant block size. In these cases, it completely avoids all memmoves. In my simple local test of rsyncing 57MB of 10 local files, memmoved bytes went from 18MB to zero. I haven't tested this for a big variety of file cases. I think that this will always reduce the memmoves involved with walking a large
2003 Sep 05
1
new option suggestion '--backup-only'
...ile, &st)) { - if (fnamecmp == fname) + if ((fnamecmp == fname) && !backup_only) set_perms(fname,file,&st,1); return; } @@ -487,6 +507,11 @@ return; } + if (backup_only) { + make_backup(fname); + return; + } + if (disable_deltas_p()) { write_int(f_out,i); write_sum_head(f_out, NULL); diff -ur rsync/options.c rsync-backuponly/options.c --- rsync/options.c 2003-08-06 15:45:14.000000000 +0900 +++ rsync-backuponly/options.c 2003-09-02 15:53:10.000000000 +0900 @@ -119,6 +119,7 @@ char *backup_dir = NULL; int rsync_port = RSYNC_PORT; int link_dest = 0; +int backup_on...
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);
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...oadparm.o clientserver.o access.o connection.o authenticate.o popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o patchwork diff proto.h --- proto.h 2004-02-09 15:42:50.000000000 -0500 +++ proto.h 2004-02-09 15:42:52.000000000 -0500 @@ -90,6 +90,12 @@ 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); +char* make_hash_name(struct file_struct *file); +void kill_hashfile(struct hashfile_struct *hashfile); +voi...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
..._dir; + } + if (files_from && (!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_h...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
..._dir; + } + if (files_from && (!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_h...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
..._dir; + } + if (files_from && (!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_h...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
..._dir; + } + if (files_from && (!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_h...
2004 Mar 10
4
HFS+ resource forks: WIP patch included
...[]); struct file_list *recv_file_list(int f); int file_compare(struct file_struct **f1, struct file_struct **f2); @@ -87,6 +107,7 @@ struct file_list *flist_new(void); void flist_free(struct file_list *flist); char *f_name(struct file_struct *f); +char *f_name_dst(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); @@ -142,6 +163,7 @@ char *lp_include(int ); char *lp_include_from(int ); char *lp_log_format(int ); +char...