(Recent I/O change)

Wayne Davison wayned at samba.org
Mon Oct 12 15:04:43 MDT 2009

On Mon, Oct 5, 2009 at 1:51 AM, Matt McCutchen <matt at mattmccutchen.net>wrote:

> Would you care to explain the impact of this change on the rsync I/O
> design in terms that I might understand?  It looks like you merged two
> switch statements over possible message types, reducing code
> duplication, but that's all I can really tell.

In addition to simplifying the code, it makes the message pipe more robust.
The old code just sent raw file-list data (of unspecified length) as an
implied part of the MSG_FLIST message.  The new code packs raw data into
MSG_DATA messages, which will allow other messages to intermingle with the
data.  If the code had been working like this from the start of 3.0, I could
have fixed the issue where an I/O error isn't getting noticed soon enough
just by having the sender send its I/O error message before the end of the
file-list data.

As for the unsightly files-from code block, that will be changing soon,
since I'm currently working on simplifying the I/O code.  The new code will
mainly use a single buffered-I/O function for all the normal pipelining of
data, making it simpler, less likely to jam up, and hopefully more
performant too.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20091012/9db197ce/attachment.html>

More information about the rsync mailing list