The branch, master has been updated via 49eb0c4 Mention that sorting the --files-from input is helpful. via 050e533 Added "listen backlog" daemon config paramater. from bf4170a Daemon supports forward-DNS lookups for simple hostnames in hosts deny/allow config settings.
;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 49eb0c4a3518ad16d9a67f136fc6f1965c8690f0 Author: Wayne Davison <way...@samba.org> Date: Mon Jan 3 19:49:05 2011 -0800 Mention that sorting the --files-from input is helpful. commit 050e5334d8eb98b3b851bdeb4e174d2afc53b795 Author: Wayne Davison <way...@samba.org> Date: Mon Jan 3 19:42:27 2011 -0800 Added "listen backlog" daemon config paramater. ----------------------------------------------------------------------- Summary of changes: loadparm.c | 4 ++++ rsync.yo | 6 ++++++ rsyncd.conf.yo | 3 +++ socket.c | 2 +- 4 files changed, 14 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/loadparm.c b/loadparm.c index 792c3da..965b771 100644 --- a/loadparm.c +++ b/loadparm.c @@ -97,6 +97,7 @@ typedef struct { char *pid_file; char *socket_options; + int listen_backlog; int rsync_port; } global_vars; @@ -175,6 +176,7 @@ static const all_vars Defaults = { /* pid_file; */ NULL, /* socket_options; */ NULL, + /* listen_backlog; */ 5, /* rsync_port; */ 0, }, @@ -311,6 +313,7 @@ static struct enum_list enum_facilities[] = { static struct parm_struct parm_table[] = { {"address", P_STRING, P_GLOBAL,&Vars.g.bind_address, NULL,0}, + {"listen backlog", P_INTEGER,P_GLOBAL,&Vars.g.listen_backlog, NULL,0}, {"motd file", P_STRING, P_GLOBAL,&Vars.g.motd_file, NULL,0}, {"pid file", P_STRING, P_GLOBAL,&Vars.g.pid_file, NULL,0}, {"port", P_INTEGER,P_GLOBAL,&Vars.g.rsync_port, NULL,0}, @@ -445,6 +448,7 @@ FN_GLOBAL_STRING(lp_motd_file, &Vars.g.motd_file) FN_GLOBAL_STRING(lp_pid_file, &Vars.g.pid_file) FN_GLOBAL_STRING(lp_socket_options, &Vars.g.socket_options) +FN_GLOBAL_INTEGER(lp_listen_backlog, &Vars.g.listen_backlog) FN_GLOBAL_INTEGER(lp_rsync_port, &Vars.g.rsync_port) FN_LOCAL_STRING(lp_auth_users, auth_users) diff --git a/rsync.yo b/rsync.yo index 456bd4f..af95b85 100644 --- a/rsync.yo +++ b/rsync.yo @@ -1619,6 +1619,12 @@ bf(--files-from) filenames are being sent from one host to another, the filenames will be translated from the sending host's charset to the receiving host's charset. +NOTE: sorting the list of files in the --files-from input helps rsync to be +more efficient, as it will avoid re-visiting the path elements that are shared +between adjacent entries. If the input is not sorted, some path elements +(implied directories) may end up being scanned multiple times, and rsync will +eventually unduplicate them after they get turned into file-list elements. + dit(bf(-0, --from0)) This tells rsync that the rules/filenames it reads from a file are terminated by a null ('\0') character, not a NL, CR, or CR+LF. This affects bf(--exclude-from), bf(--include-from), bf(--files-from), and any diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo index 2dbf67c..f7f483b 100644 --- a/rsyncd.conf.yo +++ b/rsyncd.conf.yo @@ -120,6 +120,9 @@ details on some of the options you may be able to set. By default no special socket options are set. These settings can also be specified via the bf(--sockopts) command-line option. +dit(bf(listen backlog)) You can override the default backlog value when the +daemon listens for connections. It defaults to 5. + enddit() manpagesection(MODULE PARAMETERS) diff --git a/socket.c b/socket.c index 8162974..c19412d 100644 --- a/socket.c +++ b/socket.c @@ -546,7 +546,7 @@ void start_accept_loop(int port, int (*fn)(int, int)) /* ready to listen */ FD_ZERO(&deffds); for (i = 0, maxfd = -1; sp[i] >= 0; i++) { - if (listen(sp[i], 5) < 0) { + if (listen(sp[i], lp_listen_backlog()) < 0) { rsyserr(FERROR, errno, "listen() on socket failed"); #ifdef INET6 if (errno == EADDRINUSE && i > 0) { -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs