diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2010-09-29 10:38:41 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2010-09-29 12:14:24 +1000 |
commit | 39c367a68ff47efc7b61bf8247ad60fd4cfbfbc8 (patch) | |
tree | 4171609f9f24ba4680540e296538bd73b91452e7 /ctdb/server/ctdb_call.c | |
parent | 869242a7cdef1169fc310efea1624ec6e134ad19 (diff) | |
download | samba-39c367a68ff47efc7b61bf8247ad60fd4cfbfbc8.tar.gz |
Create macros to update the statistics counters and use these macros
everywhere instead of manipulating the coutenrs directly.
(This used to be ctdb commit 2e648df890e5713bc575965d87937827b068d0d7)
Diffstat (limited to 'ctdb/server/ctdb_call.c')
-rw-r--r-- | ctdb/server/ctdb_call.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c index 84a8c78e64b..0bb7902dc3f 100644 --- a/ctdb/server/ctdb_call.c +++ b/ctdb/server/ctdb_call.c @@ -463,9 +463,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) return; } - if (c->hopcount > ctdb->statistics.max_hop_count) { - ctdb->statistics.max_hop_count = c->hopcount; - } + CTDB_UPDATE_STAT(ctdb, max_hop_count, c->hopcount); /* if this nodes has done enough consecutive calls on the same record then give them the record @@ -827,7 +825,7 @@ void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode) r->hdr.destnode = destnode; r->hdr.reqid = 0; - ctdb->statistics.keepalive_packets_sent++; + CTDB_INCREMENT_STAT(ctdb, keepalive_packets_sent); ctdb_queue_packet(ctdb, &r->hdr); |