[PATCH] Batch-mode rewrite
Chris Shoemaker
c.shoemaker at cox.net
Mon Jul 19 22:20:27 GMT 2004
helps to attach, eh?
On Mon, Jul 19, 2004 at 06:18:49PM -0400, Chris Shoemaker wrote:
> On Sun, Jul 18, 2004 at 08:37:03PM -0700, Wayne Davison wrote:
> > On Sun, Jul 18, 2004 at 06:20:59PM -0400, Chris Shoemaker wrote:
> > > Could a simplified version of this index notification take place over
> > > the existing error-pipe pair?
> >
> > The data is traveling in the opposite direction for what we need (and
> > it's not bidirectional).
> >
>
> Ok, how about this: Instead of index notification, run the generator
> and receiver serially.
>
> I've attached a concept patch. I don't like creating such a
> special-case for read-batch, but it seems like it might solve the
> problem you found.
>
> OTOH, I can see some benefit to mainlining some sort of g2r index
> notification just as an on-going sanity check.
>
> -chris
>
> > ..wayne..
> --
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-------------- next part --------------
Index: main.c
===================================================================
RCS file: /cvsroot/rsync/main.c,v
retrieving revision 1.208
diff -u -r1.208 main.c
--- main.c 19 Jul 2004 17:11:41 -0000 1.208
+++ main.c 20 Jul 2004 03:04:53 -0000
@@ -463,6 +463,18 @@
io_flush(NORMAL_FLUSH);
+ if (read_batch) {
+ io_start_buffering_out();
+ set_msg_fd_in(error_pipe[0]);
+ set_msg_fd_out(error_pipe[1]);
+ send_msg(MSG_DONE, "", 0);
+ generate_files(f_out, flist, local_name);
+ recv_files(f_in, flist, local_name);
+ io_flush(FULL_FLUSH);
+ report(f_in);
+ return 0;
+ }
+
if ((pid = do_fork()) == 0) {
close(error_pipe[0]);
if (f_in != f_out)
More information about the rsync
mailing list