@@ -86,7 +86,7 @@ int sparse_files = 0;
8686int preallocate_files = 0 ;
8787int do_compression = 0 ;
8888int do_compression_level = CLVL_NOT_SPECIFIED ;
89- int do_compression_threads = 0 ;
89+ int do_compression_threads = 0 ; /*n = 0 use rsync thread, n >= 1 spawn n threads for compression */
9090int am_root = 0 ; /* 0 = normal, 1 = root, 2 = --super, -1 = --fake-super */
9191int am_server = 0 ;
9292int am_sender = 0 ;
@@ -755,10 +755,10 @@ static struct poptOption long_options[] = {
755755 {"compress-choice" , 0 , POPT_ARG_STRING , & compress_choice , 0 , 0 , 0 },
756756 {"zc" , 0 , POPT_ARG_STRING , & compress_choice , 0 , 0 , 0 },
757757 {"skip-compress" , 0 , POPT_ARG_STRING , & skip_compress , 0 , 0 , 0 },
758- {"compress-threads" , 0 , POPT_ARG_INT , & do_compression_threads , 0 , 0 , 0 },
759- {"zt" , 0 , POPT_ARG_INT , & do_compression_threads , 0 , 0 , 0 },
760758 {"compress-level" , 0 , POPT_ARG_INT , & do_compression_level , 0 , 0 , 0 },
761759 {"zl" , 0 , POPT_ARG_INT , & do_compression_level , 0 , 0 , 0 },
760+ {"compress-threads" , 0 , POPT_ARG_INT , & do_compression_threads , 0 , 0 , 0 },
761+ {"zt" , 0 , POPT_ARG_INT , & do_compression_threads , 0 , 0 , 0 },
762762 {0 , 'P' , POPT_ARG_NONE , 0 , 'P' , 0 , 0 },
763763 {"progress" , 0 , POPT_ARG_VAL , & do_progress , 1 , 0 , 0 },
764764 {"no-progress" , 0 , POPT_ARG_VAL , & do_progress , 0 , 0 , 0 },
@@ -2009,6 +2009,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
20092009 create_refuse_error (refused_compress );
20102010 goto cleanup ;
20112011 }
2012+ if (do_compression_threads < 0 )
2013+ do_compression_threads = 0 ;
20122014 }
20132015
20142016#ifdef HAVE_SETVBUF
0 commit comments