search for: recv_ok

Displaying 20 results from an estimated 22 matches for "recv_ok".

Did you mean: recv_tok
2005 Jul 26
1
[patch] paranoid checksum checking
...eck that the file written to local disk has the same + checksum as the file in the originating location. This + is a further paranoia check, just to make sure that + we really have successfully transferred the file. */ + if (recv_ok && ! am_server && always_checksum) { + char csum[MD4_SUM_LENGTH + 1]; + file_checksum (fnametmp, csum, file->length); + if (memcmp(csum, file->u.sum, MD4_SUM_LENGTH) != 0) { +...
2004 Mar 01
0
[PATCH] pxelinux corrupts ipappend-ed paramaters...
...; store in AH + xor al,al ; AL = 0 + out 70h,al ; enable NMI + udelay + sti ; enable interrupts + xor [NextSocket],ah +%endif ; ; Now attempt to get the BOOTP/DHCP packet that brought us life (and an IP ; address). This lives in the DHCPACK packet (query info 2). @@ -1785,6 +1835,10 @@ .recv_ok: pop dx ; <F> pop cx ; <E> + mov ax,[si+tftp_remoteport] + cmp ax,[pxe_udp_read_pkt.rport] + jne .wait_data ; data from orphaned tftpd +.port_ok: cmp word [pxe_udp_read_pkt.buffersize],byte 4 jb .wait_data ; Bad size for a DATA packet @@ -2034,6 +2088,8 @@ mo...
2010 Nov 23
0
[PATCH 3/3] Inform kernel of FADV_DONTNEED hint in receiver
...hing writing to a destinataion fd in the receiver. --- receiver.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/receiver.c b/receiver.c index 39c5e49..33b21fb 100644 --- a/receiver.c +++ b/receiver.c @@ -721,6 +721,12 @@ int recv_files(int f_in, char *local_name) recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, F_LENGTH(file)); + if (do_fadvise(fd2, 0, 0, POSIX_FADV_DONTNEED) != 0) { + rsyserr(FERROR_XFER, errno, + "fadvise failed in writing %s", +...
2008 Aug 20
0
Problem with exact moment of issuing transfer log entry for a [recv] action
...ything for the case when --delay-updates is used, but for this case syncing of external actions on [recv] log entries is explicitly meaningless. --- rsync-3.0.3.orig/receiver.c 2008-08-20 16:28:41.000000000 +0400 +++ rsync-3.0.3/receiver.c 2008-08-20 16:33:06.000000000 +0400 @@ -678,8 +678,6 @@ recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, F_LENGTH(file)); - log_item(log_code, file, &initial_stats, iflags, NULL); - if (fd1 != -1) close(fd1); if (close(fd2) < 0) { @@ -719,6 +717,7 @@ if (remove_source_files || inc_recurse || (preserve_...
2003 May 20
0
patch for better handling of write failures (disk full)
...exit_cleanup(RERR_FILEIO); } sum_end(file_sum1); @@ -293,6 +300,8 @@ return 0; } } + if (discard) + return 2; return 1; } @@ -458,6 +467,16 @@ close(fd1); } close(fd2); + + /* + * This means a write error occured, and the file is discarded + */ + if (recv_ok == 2) { + if (verbose > 2) + rprintf(FINFO,"discarding %s\n",fname); + do_unlink(fnametmp); + cleanup_disable(); + } else { if (verbose > 2) rprintf(FINFO,"renaming %s to %s\n",fnametmp,fname); @@ -476,6 +495,7 @@ write_int(f_gen,i); } } +...
2003 Feb 22
1
rsync ported to BeOS-bone
...FERROR,"mkstemp %s failed: %s\n",fnametmp,strerror(errno)); - receive_data(f_in,buf,-1,NULL,file->length); + recv_data(f_in,buf,-1,NULL,file->length); if (buf) unmap_file(buf); if (fd1 != -1) close(fd1); continue; @@ -449,7 +449,7 @@ } /* recv file data */ - recv_ok = receive_data(f_in,buf,fd2,fname,file->length); + recv_ok = recv_data(f_in,buf,fd2,fname,file->length); log_recv(file, &initial_stats); --- rsync-2.5.6.org/batch.c Tue Dec 24 08:42:04 2002 +++ rsync-2.5.6/batch.c Fri Feb 21 16:45:47 2003 @@ -8,6 +8,10 @@ #include "rsync.h...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...ed: %s\n", full_fname(fnametmp), strerror(errno)); - receive_data(f_in,buf,-1,NULL,file->length); + receive_data(f_in,buf,-1,NULL,file->length,NULL); if (buf) unmap_file(buf); if (fd1 != -1) close(fd1); continue; @@ -495,7 +506,12 @@ } /* recv file data */ - recv_ok = receive_data(f_in,buf,fd2,fname,file->length); +#ifdef HAVE_LINK + if (link_by_hash_dir) { + file->sum = (char*)malloc (MD4_SUM_LENGTH); + } +#endif + recv_ok = receive_data(f_in,buf,fd2,fname,file->length,file->sum); log_recv(file, &initial_stats); patchwork diff rs...
2004 Jan 17
1
--delete-sent-files (AKA --move-files)
...r *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(FERROR,"ERROR: file corruption in %s. File changed during transfer?\n", full_fname(fname)); } el...
2012 Feb 18
4
FADV_DONTNEED support
While going through an old todo list I found that these patches had fallen by the way-side. About a year ago I initiated a discussion[1] with the Linux kernel folks regarding the lack of any useable fadvise support on the kernel side. As a result, I was observing extremely poor performance on my server after backup as executable pages were being swapped out in favor of data waiting to be flushed
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...t;, full_fname(fnametmp), strerror(errno)); - receive_data(f_in,mapbuf,-1,NULL,file->length); + receive_data(f_in,mapbuf,-1,NULL,file->length,NULL); if (mapbuf) unmap_file(mapbuf); if (fd1 != -1) close(fd1); continue; @@ -450,7 +460,12 @@ } /* recv file data */ - recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length); +#ifdef HAVE_LINK + if (link_by_hash_dir) { + file->u.sum = (char*)malloc (MD4_SUM_LENGTH); + } +#endif + recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length,file->u.sum); log_recv(file, &initial_stats); patchwork...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...t;, full_fname(fnametmp), strerror(errno)); - receive_data(f_in,mapbuf,-1,NULL,file->length); + receive_data(f_in,mapbuf,-1,NULL,file->length,NULL); if (mapbuf) unmap_file(mapbuf); if (fd1 != -1) close(fd1); continue; @@ -450,7 +460,12 @@ } /* recv file data */ - recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length); +#ifdef HAVE_LINK + if (link_by_hash_dir) { + file->u.sum = (char*)malloc (MD4_SUM_LENGTH); + } +#endif + recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length,file->u.sum); log_recv(file, &initial_stats); patchwork...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...t;, full_fname(fnametmp), strerror(errno)); - receive_data(f_in,mapbuf,-1,NULL,file->length); + receive_data(f_in,mapbuf,-1,NULL,file->length,NULL); if (mapbuf) unmap_file(mapbuf); if (fd1 != -1) close(fd1); continue; @@ -450,7 +460,12 @@ } /* recv file data */ - recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length); +#ifdef HAVE_LINK + if (link_by_hash_dir) { + file->u.sum = (char*)malloc (MD4_SUM_LENGTH); + } +#endif + recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length,file->u.sum); log_recv(file, &initial_stats); patchwork...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...t;, full_fname(fnametmp), strerror(errno)); - receive_data(f_in,mapbuf,-1,NULL,file->length); + receive_data(f_in,mapbuf,-1,NULL,file->length,NULL); if (mapbuf) unmap_file(mapbuf); if (fd1 != -1) close(fd1); continue; @@ -450,7 +460,12 @@ } /* recv file data */ - recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length); +#ifdef HAVE_LINK + if (link_by_hash_dir) { + file->u.sum = (char*)malloc (MD4_SUM_LENGTH); + } +#endif + recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length,file->u.sum); log_recv(file, &initial_stats); patchwork...
2009 Jan 24
2
[patch] Replace illegal characters in filenames for FAT (switch)
...s; extern int preserve_perms; extern int preserve_xattrs; +extern int fat_filenames; extern int basis_dir_cnt; extern int make_backups; extern int cleanup_got_literal; @@ -441,6 +442,8 @@ int recv_files(int f_in, char *local_name) const char *parent_dirname = ""; #endif int ndx, recv_ok; + int i; + static const char fat_invalid_chars[] = "*/:<>?\\|\""; if (DEBUG_GTE(RECV, 1)) rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->used); @@ -487,6 +490,14 @@ int recv_files(int f_in, char *local_name) file = dir_flist->files[cur_...
2004 Apr 15
0
Multiple compare-dest args
...ern 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 the file at compare_dest instead */ pathjoin(fnamecmpbuf, sizeof fnamecmpbu...
2003 May 23
1
PATCH: better handling for write failures (disk full)
...exit_cleanup(RERR_FILEIO); } sum_end(file_sum1); @@ -293,6 +300,8 @@ return 0; } } + if (discard) + return 2; return 1; } @@ -458,6 +467,16 @@ close(fd1); } close(fd2); + + /* + * This means a write error occured, and the file is discarded + */ + if (recv_ok == 2) { + if (verbose > 2) + rprintf(FINFO,"discarding %s\n",fname); + do_unlink(fnametmp); + cleanup_disable(); + } else { if (verbose > 2) rprintf(FINFO,"renaming %s to %s\n",fnametmp,fname); @@ -476,6 +495,7 @@ write_int(f_gen,i); } } +...
2003 Oct 06
2
Patch to revive tmpfiles
...close(fd1); + } if (verbose > 2) rprintf(FINFO,"renaming %s to %s\n",fnametmp,fname); finish_transfer(fname, fnametmp, file); + close(fd2); cleanup_disable(); if (!recv_ok) { -- Hans Eric Sandstr?m MailCORE AB ps. A --lock option to mutually exclude updates to the same file from competing rsyncs would be a nice feature. That would sort of obsolete the lockfile trick above.
2023 Jul 03
0
[PATCH] Add option --log-after to log after moving file into place
...am_server; extern int inc_recurse; extern int log_before_transfer; +extern int log_after_transfer; extern int stdout_format_has_i; extern int logfile_format_has_i; extern int want_xattr_optim; @@ -876,7 +877,9 @@ int recv_files(int f_in, int f_out, char *local_name) /* recv file data */ recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, file, inplace || one_inplace); - log_item(log_code, file, iflags, NULL); + /* log the transfer result after file is moved into place */ + if (!log_after_transfer) + log_item(log_code, file, iflags, NULL); if (want_progress_now)...
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
2003 Feb 05
6
rsync 1tb+ each day
I am rsyncing 1tb of data each day. I am finding in my testing that actually removing the target files each day then rsyncing is faster than doing a compare of the source->target files then rsyncing over the delta blocks. This is because we have a fast link between the two boxes, and that are disk is fairly slow. I am finding that the creation of the temp file (the 'dot file') is