search for: mapbuf

Displaying 14 results from an estimated 14 matches for "mapbuf".

Did you mean: macbuf
2004 Apr 27
1
[PATCH] Inplace option for rsync
...} } offset += len; } flush_write_file(fd); + if (inplace) + ftruncate(fd, offset); + if (do_progress) end_progress(total_size); @@ -410,39 +424,52 @@ } else mapbuf = NULL; - if (!get_tmpname(fnametmp,fname)) { - if (mapbuf) unmap_file(mapbuf); - if (fd1 != -1) close(fd1); - continue; - } - - strlcpy(template, fnametmp, sizeof template); + /* We now check to...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...flist); int hard_link_check(struct file_struct *file, int skip); void do_hard_links(void); patchwork diff receiver.c --- receiver.c 2004-02-23 10:22:51.000000000 -0500 +++ receiver.c 2004-02-23 10:22:51.000000000 -0500 @@ -186,10 +186,11 @@ static int receive_data(int f_in,struct map_struct *mapbuf,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; @@ -199,7 +200,9 @@ char *map=NULL; read_sum_head(f_in, &sum); - + if (md4) + mdfour_begin(...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...flist); int hard_link_check(struct file_struct *file, int skip); void do_hard_links(void); patchwork diff receiver.c --- receiver.c 2004-02-17 10:36:44.000000000 -0500 +++ receiver.c 2004-02-17 13:10:23.000000000 -0500 @@ -186,10 +186,11 @@ static int receive_data(int f_in,struct map_struct *mapbuf,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; @@ -199,7 +200,9 @@ char *map=NULL; read_sum_head(f_in, &sum); - + if (md4) + mdfour_begin(...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...flist); int hard_link_check(struct file_struct *file, int skip); void do_hard_links(void); patchwork diff receiver.c --- receiver.c 2004-02-23 10:22:51.000000000 -0500 +++ receiver.c 2004-02-23 10:22:51.000000000 -0500 @@ -186,10 +186,11 @@ static int receive_data(int f_in,struct map_struct *mapbuf,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; @@ -199,7 +200,9 @@ char *map=NULL; read_sum_head(f_in, &sum); - + if (md4) + mdfour_begin(...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...flist); int hard_link_check(struct file_struct *file, int skip); void do_hard_links(void); patchwork diff receiver.c --- receiver.c 2004-02-16 10:24:39.000000000 -0500 +++ receiver.c 2004-02-16 10:19:41.000000000 -0500 @@ -186,10 +186,11 @@ static int receive_data(int f_in,struct map_struct *mapbuf,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; @@ -199,7 +200,9 @@ char *map=NULL; read_sum_head(f_in, &sum); - + if (md4) + mdfour_begin(...
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
2004 Jun 17
1
[PATCH] make write_batch local
...xist */ if (preserve_hard_links && hard_link_check(file, HL_SKIP)) return; ! write_null_sum(f_out, i); return; } *************** *** 533,539 **** rprintf(FINFO, "generating and sending sums for %d\n", i); write_int(f_out,i); ! generate_and_send_sums(mapbuf, st.st_size, f_out); close(fd); if (mapbuf) unmap_file(mapbuf); --- 559,565 ---- rprintf(FINFO, "generating and sending sums for %d\n", i); write_int(f_out,i); ! generate_and_send_sums(mapbuf, st.st_size, f_out, i); close(fd); if (mapbuf) unmap_file(mapbuf); I...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...uot;received file descriptor %d\n", i); + if (i <= 0) + offset = -1; + write_buf(local_socket, (char *)&offset, sizeof(offset)); + if (i <= 0) + return 0; + f_in = -i; + } + if (fd_r >= 0 && size_r > 0) { int32 read_size = MAX(sum.blength * 2, 16*1024); mapbuf = map_file(fd_r, size_r, read_size, sum.blength); @@ -231,11 +245,18 @@ stats.literal_data += i; cleanup_got_literal = 1; - sum_update(data, i); + if (f_in >= 0) + /* no need for md4 during fast copy -goldor */ + sum_update(data, i); if (fd != -1 && write_file(f...
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...66,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 on %s", - full_fname(fnam...
2009 Apr 26
4
DO NOT REPLY [Bug 6293] New: rsync crashes when transferring files
...39;s happening inside my virtual machine. On the the end with the crash, this is what I believe happens: - something causes line 689 in receiver.c to return -1 - discard_receive_data gets called - receive_data gets called with fd_r=-1 - line 181 of receiver.c doesn't match - line 189 sets mapbuf = NULL - line 202 calls map_ptr with map=0x0 - line 192 tries to access map->p_offset with a NULL pointer I have a core dump and can provide more information if required. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: -...
2004 Apr 15
0
Multiple compare-dest args
...7 @@ extern int cvs_exclude; extern int io_error; extern char *tmpdir; -extern char *compare_dest; +extern char *compare_dest[]; extern int make_backups; extern int do_progress; extern char *backup_dir; @@ -295,7 +295,7 @@ char *fnamecmp; char fnamecmpbuf[MAXPATHLEN]; struct map_struct *mapbuf; - int i; + int i, j; struct file_struct *file; int phase=0; int recv_ok; @@ -361,12 +361,14 @@ /* open the file */ fd1 = do_open(fnamecmp, O_RDONLY, 0); - if (fd1 == -1 && compare_dest != NULL) { + j = 0; + while (fd1 == -1 && compare_dest[j] != NULL) { /* try...
2004 Jan 17
1
--delete-sent-files (AKA --move-files)
...static void delete_one(char *fn, int is_dir) { @@ -287,7 +288,7 @@ int recv_files(int f_in,struct file_list char *fname, fbuf[MAXPATHLEN]; char template[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; - char *fnamecmp; + char *fnamecmp, numbuf[4]; char fnamecmpbuf[MAXPATHLEN]; struct map_struct *mapbuf; int i; @@ -461,16 +462,20 @@ int recv_files(int f_in,struct file_list cleanup_disable(); - if (!recv_ok) { + if (recv_ok) { + if (delete_sent_files) { + SIVAL(numbuf, 0, i); + send_msg(MSG_SUCCESS, numbuf, 4); + } + } else { if (csum_length == SUM_LENGTH) { rprintf(F...
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 Jul 14
12
HP-UX 11i and largefiles on rsync 2.6.2
Hello, I'm running HP-UX 11i on an rp74xx. It's 64-bit. C compiler is as follows: B3901BA B.11.11.03 HP C/ANSI C Developer's Bundle for HP-UX 11.i (S800) B3913DB C.03.30.02 HP aC++ Compiler (S800) /usr/bin/cc: LINT B.11.11.02 CXREF B.11.11.02 HP92453-01 B.11.11.02 HP C Compiler $ Sep 8 2000 23:13:51 $ I have successfully compiled rsync 2.6.2 and it