Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bogus rsync "Success" message when out of disk space

0 views
Skip to first unread message

John Van Essen

unread,
Nov 7, 2002, 4:03:07 AM11/7/02
to
To the rsync maintainers:

When rsync 2.5.5 is pulling files and the target disk runs out of space,
this is what the tail end of the message stream looks like (w/--verbose):


write failed on games/ghostmaster/ectsdemo2002.zip : Success
rsync error: error in file IO (code 11) at receiver.c(243)
rsync: connection unexpectedly closed (152112 bytes read so far)
rsync error: error in rsync protocol data stream (code 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 failed on %s : %s\n",fname,
strerror(errno ? errno : ENOSPC));


Another small request while I have your attention.

In main.c:

rprintf(FINFO, RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n",

Could you prepend a newline to the beginning of this so it does not
blend in with the last line of any transfer-related output?

rprintf(FINFO, RSYNC_NAME "\n[%d] (%s%s%s) heap statistics:\n",

Thanks.
--
John Van Essen Univ of MN Alumnus <vane...@umn.edu>
3DGamers Systems Software Support <j...@3dgamers.com>

--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

0 new messages