From 8bebb380e8b581b41f3057c128d73094c1bde332 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 1 Mar 2010 14:28:22 +0100 Subject: 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. --- source3/utils/status.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/utils/status.c') diff --git a/source3/utils/status.c b/source3/utils/status.c index 6d616149d7..60cad2c28f 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -232,8 +232,7 @@ static void print_brl(struct file_id id, TALLOC_FREE(share_mode); } -static int traverse_fn1(struct db_record *rec, - const struct connections_key *key, +static int traverse_fn1(const struct connections_key *key, const struct connections_data *crec, void *state) { @@ -447,7 +446,7 @@ static int traverse_sessionid(struct db_record *db, void *state) d_printf("\nService pid machine Connected at\n"); d_printf("-------------------------------------------------------\n"); - connections_forall(traverse_fn1, NULL); + connections_forall_read(traverse_fn1, NULL); d_printf("\n"); -- cgit