diff options
author | Volker Lendecke <vl@samba.org> | 2010-03-01 14:28:22 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-03-01 14:51:34 +0100 |
commit | 8bebb380e8b581b41f3057c128d73094c1bde332 (patch) | |
tree | 3470aabb76b4800f32ef85a13f6f53936a9e261e /source3/utils/smbcontrol.c | |
parent | 3deba6349ca751d669e2af817ec7e2c7eb6195b3 (diff) | |
download | samba-8bebb380e8b581b41f3057c128d73094c1bde332.tar.gz samba-8bebb380e8b581b41f3057c128d73094c1bde332.tar.bz2 samba-8bebb380e8b581b41f3057c128d73094c1bde332.zip |
s3: Add connections_forall_read()
In a cluster, this makes a large difference: For r/w traverse, we have to do a
fetch_locked on every record which for most users of connections_forall is just
overkill.
Diffstat (limited to 'source3/utils/smbcontrol.c')
-rw-r--r-- | source3/utils/smbcontrol.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 0ecab1b5d4..5645386028 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -259,8 +259,7 @@ cleanup: ptrace(PTRACE_DETACH, pid, NULL, NULL); } -static int stack_trace_connection(struct db_record *rec, - const struct connections_key *key, +static int stack_trace_connection(const struct connections_key *key, const struct connections_data *crec, void *priv) { @@ -291,7 +290,7 @@ static bool do_daemon_stack_trace(struct messaging_context *msg_ctx, */ print_stack_trace(dest, &count); } else { - connections_forall(stack_trace_connection, &count); + connections_forall_read(stack_trace_connection, &count); } return True; |