search for: rerr_fileio

Displaying 20 results from an estimated 20 matches for "rerr_fileio".

2003 May 20
0
patch for better handling of write failures (disk full)
...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); + discard = 1; + fd = -1; + // exit_cleanup(RERR_FILEIO); } offset += i; continue; @@ -268,7 +271,9 @@ if (fd != -1 && write_file(fd,map,len) != (int) len) { rprintf(FERROR,"write failed on %s : %s\n", fname,strerror(errno)); - exit_cleanup(RER...
2003 May 23
1
PATCH: better handling for write failures (disk full)
...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); + discard = 1; + fd = -1; + // exit_cleanup(RERR_FILEIO); } offset += i; continue; @@ -268,7 +271,9 @@ if (fd != -1 && write_file(fd,map,len) != (int) len) { rprintf(FERROR,"write failed on %s : %s\n", fname,strerror(errno)); - exit_cleanup(RER...
2004 Apr 27
1
rsync-2.6.1 close() fixes
...19:11:46.000000000 +0300 @@ -45,6 +45,7 @@ extern int cleanup_got_literal; extern int module_id; extern int ignore_errors; extern int orig_umask; +extern int do_fsync; static void delete_one(char *fn, int is_dir) { @@ -268,6 +269,12 @@ static int receive_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 @@ i...
2004 Apr 27
1
[PATCH] Inplace option for rsync
...000 +1000 @@ -45,6 +45,7 @@ extern int module_id; extern int ignore_errors; extern int orig_umask; +extern int inplace; static void delete_one(char *fn, int is_dir) { @@ -226,6 +227,7 @@ full_fname(fname), strerror(errno)); exit_cleanup(RERR_FILEIO); } + offset += i; continue; } @@ -249,16 +251,28 @@ sum_update(map,len); } - if (fd != -1 && write_file(fd,map,len) != (int) len) { - rprintf(FERROR, "wri...
2005 Jul 26
1
[patch] paranoid checksum checking
...-- extern int ignore_errors; extern int orig_umask; extern int keep_partial; + extern int always_checksum; extern int checksum_seed; extern int inplace; extern int delay_updates; *************** int recv_files(int f_in, struct file_lis *** 649,654 **** --- 650,669 ---- exit_cleanup(RERR_FILEIO); } + /* Check 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 t...
2005 Sep 20
2
Nulls instead of data
In short: Platform: linux with 2.4 kernel Version: rsync 2.6.6 Command line: rsync266 -av -W --bwlimit=1 /mnt/somedir/rsync-2.6.6.tar.gz ./ Destination: local disk Source: file on a smbfs mounted filesystem; share is exported on a NT 4.0 workstation over a very slow and unstable link Result: Rsync completes operation with no special message, but the resulting file is damaged, large
2010 Nov 09
5
Changes made to main.c on implementing real time Rsync
...} } if( mkdir_defmode( parentFolder ) != 0 ) { rsyserr(FERROR, errno, "mkdir recursive parent folder %s for child folder %s failed", full_fname(parentFolder), full_fname(dest_path)); exit_cleanup(RERR_FILEIO); } pFound = pFound + 1; } if( mkdir_defmode( dest_path ) != 0 ) { rsyserr(FERROR, errno, "mkdir %s failed", full_fname(dest_path)); exit_cleanup(RERR_FILEIO); }...
2003 Oct 25
1
Trivial documentation patch
...was made to manipulate 64-bit files on a platform that cannot support them; or an option was speciifed that is supported by the client and not by the server. +dit(bf(RERR_STARTCLIENT 5)) Error starting client-server protocol + dit(bf(RERR_SOCKETIO 10)) Error in socket IO dit(bf(RERR_FILEIO 11)) Error in file IO dit(bf(RERR_STREAMIO 12)) Error in rsync protocol data stream @@ -1126,6 +1128,7 @@ dit(bf(RERR_SIGNAL 20)) Received SIGUSR1 or SIGINT dit(bf(RERR_WAITCHILD 21)) Some error returned by waitpid() dit(bf(RERR_MALLOC 22)) Error allo...
2003 Aug 24
1
readdir() and read() errors ignored
...24:44 -0000 1.6 +++ fileio.c 23 Aug 2003 23:03:01 -0000 @@ -191,7 +191,10 @@ } if ((nread=read(map->fd,map->p + read_offset,read_size)) != read_size) { - if (nread < 0) nread = 0; + if (nread < 0) { + rprintf(FERROR,"read failed in map_ptr\n"); + exit_cleanup(RERR_FILEIO); + } /* the best we can do is zero the buffer - the file has changed mid transfer! */ memset(map->p+read_offset+nread, 0, read_size - nread); Index: flist.c =================================================================== RCS file: /cvsroot/rsync/flist.c,v retrieving revisio...
2009 Mar 11
0
rsyserr is occasionally dropping receiver messages
...= -1 && offset > 0 && sparse_end(fd) != 0) { report_write_error: + fprintf(stderr, "rsync: write failed on %s: %s\n", full_fname(fname), strerror(errno)); rsyserr(FERROR_XFER, errno, "write failed on %s", full_fname(fname)); exit_cleanup(RERR_FILEIO);
2002 Nov 07
0
Bogus rsync "Success" message when out of disk space
...ode 12) at io.c(150) "Success", eh? I don't think so. :) In receiver.c there are three places with code similar to: if (fd != -1 && write_file(fd,data,i) != i) { rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno)); exit_cleanup(RERR_FILEIO); } A partial write due to running out of room (as opposed to a write that fails to write any data at all) apparently does not set an error code (errno stays 0). This is on RedHat 7.2 btw. So the rprintf lines need to be changed to something like this: rprintf(FERROR,"write fai...
2004 Jul 12
2
[PATCH] Batch-mode rewrite
...const char phase_unknown[] = "unknown"; int select_timeout = SELECT_TIMEOUT; *************** *** 674,679 **** --- 676,688 ---- total += ret; } + if (write_batch && !am_sender) { + if (write(batch_fd, buffer, total) < 0) { + close(batch_fd); + exit_cleanup(RERR_FILEIO); + } + } + stats.total_read += total; } *************** *** 951,956 **** --- 960,972 ---- exit_cleanup(RERR_PROTOCOL); } + if (write_batch && am_sender) { + if (write(batch_fd, buf, len) < 0) { + close(batch_fd); + exit_cleanup(RERR_FILEIO); + } + } +...
2013 Jul 11
1
remote rsync exit code 0: is this a bug?
Hello: [I apologize if this is a repeat. I had to rebuild my posting profile, and I think I didn't do it correctly before I sent a previous version of this.] We use rsync as a part of a home-grown backup solution. In the specific case at hand, we're using rsync to copy volumes off-site. The "sending" server invokes rsync to transfer each volume to the off-site archive.
2002 Aug 05
5
[patch] read-devices
...ble)map->p_fd_offset,(double)read_start); if (do_lseek(map->fd,read_start,SEEK_SET) != read_start) { rprintf(FERROR,"lseek failed in map_ptr\n"); + /* Specifically, this will always happen if we seek in FIFO + * streams. That should never happen. */ exit_cleanup(RERR_FILEIO); } map->p_fd_offset = read_start; } - - if ((nread=read(map->fd,map->p + read_offset,read_size)) != read_size) { - if (nread < 0) nread = 0; - /* the best we can do is zero the buffer - the file - has changed mid transfer! */ - memset(map->p+read_offset+nread,...
2006 Jan 06
2
DO NOT REPLY [Bug 3382] New: hang in read() in exclude.test of testsuite
...ile(listp=0x140000010, fname=Info: no allocation applies for symbol fname at the current PC <no value>, mflags=1024, xflags=1) "exclude.c":999 999 if ((ch = getc(fp)) == EOF) { (ladebug) list $curline - 10 : 20 989 exit_cleanup(RERR_FILEIO); 990 } 991 return; 992 } 993 dirbuf[dirbuf_len] = '\0'; 994 995 while (1) { 996 char *s = line; 997 int ch, overflow = 0; 998 while (1) { > 999...
2003 Apr 27
4
Bogus rsync "Success" message when out of disk space
...nes002@umn.edu] wrote, in partial: >> In receiver.c there are three places with code similar to: >> >> if (fd != -1 && write_file(fd,data,i) != i) { >> rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno)); >> exit_cleanup(RERR_FILEIO); >> } >> >> A partial write due to running out of room (as opposed to a write >> that fails to write any data at all) apparently does not set an >> error code (errno stays 0). This is on RedHat 7.2 btw. >[snip] >> So the rprintf lines need to be changed t...
2016 Jan 12
4
[Bug 11668] New: incorrect/inconsistent behavior when --backup-dir is on a full filesystem
https://bugzilla.samba.org/show_bug.cgi?id=11668 Bug ID: 11668 Summary: incorrect/inconsistent behavior when --backup-dir is on a full filesystem Product: rsync Version: 3.1.2 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 Component: core
2002 Feb 01
0
rsync Warning: unexpected read size of 0 in map_ptr
...hed_data += len; @@ -263,7 +263,7 @@ sum_update(map,len); } - if (fd != -1 && write_file(fd,map,len) != len) { + if (fd != -1 && write_file(fd,map,len) != (int)len) { rprintf(FERROR,"write failed on %s : %s\n", fname,strerror(errno)); exit_cleanup(RERR_FILEIO); diff -ru rsync-2.4.6/sender.c rsync-2.4.6-fixed/sender.c --- rsync-2.4.6/sender.c Tue Sep 5 22:46:43 2000 +++ rsync-2.4.6-fixed/sender.c Mon Jan 28 19:11:21 2002 @@ -46,7 +46,7 @@ s->sums = NULL; if (verbose > 3) - rprintf(FINFO,"count=%d n=%d rem=%d\n", + rprintf(FINFO,&...
2011 Feb 05
2
rsync not reporting diskfull error
I am involved with the development of lbackup. This message to the rsync mailing list is related to the following thread on the lbackup-disccussion mailing list : http://tinyurl.com/lbackup-discussion-diskfull Essentially, I am curious to if any one using rsync 3.0.7 on Mac OS (10.6) Server has experienced an out of disk space error and not had a message similar to the following reported : >
2011 May 29
22
[Bug 8177] New: Problems with big sparsed files
https://bugzilla.samba.org/show_bug.cgi?id=8177 Summary: Problems with big sparsed files Product: rsync Version: 3.0.8 Platform: x64 OS/Version: Linux Status: NEW Severity: normal Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: joluinfante at gmail.com