From b45bc4ce4bd521380c08bcf2f934f3e98be4d292 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Wed, 28 Oct 2015 20:09:40 +1100 Subject: [PATCH] ctdb-daemon: Rename struct ctdb_statistics_wire to ctdb_statistics_list_old Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/client/ctdb_client.c | 11 ++++++++--- ctdb/include/ctdb_client.h | 2 +- ctdb/include/ctdb_protocol.h | 2 +- ctdb/server/ctdb_statistics.c | 5 +++-- ctdb/tools/ctdb.c | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index f6f5050c580..8504673a72c 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -4807,7 +4807,10 @@ int ctdb_ctrl_get_db_priority(struct ctdb_context *ctdb, struct timeval timeout, return 0; } -int ctdb_ctrl_getstathistory(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, TALLOC_CTX *mem_ctx, struct ctdb_statistics_wire **stats) +int ctdb_ctrl_getstathistory(struct ctdb_context *ctdb, + struct timeval timeout, uint32_t destnode, + TALLOC_CTX *mem_ctx, + struct ctdb_statistics_list_old **stats) { int ret; TDB_DATA outdata; @@ -4821,9 +4824,11 @@ int ctdb_ctrl_getstathistory(struct ctdb_context *ctdb, struct timeval timeout, return -1; } - *stats = (struct ctdb_statistics_wire *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize); + *stats = (struct ctdb_statistics_list_old *)talloc_memdup(mem_ctx, + outdata.dptr, + outdata.dsize); talloc_free(outdata.dptr); - + return 0; } diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h index 51bb359d675..b21bcee282c 100644 --- a/ctdb/include/ctdb_client.h +++ b/ctdb/include/ctdb_client.h @@ -616,7 +616,7 @@ int ctdb_ctrl_get_db_priority(struct ctdb_context *ctdb, int ctdb_ctrl_getstathistory(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, TALLOC_CTX *mem_ctx, - struct ctdb_statistics_wire **stats); + struct ctdb_statistics_list_old **stats); struct ctdb_ltdb_header *ctdb_header_from_record_handle( struct ctdb_record_handle *h); diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h index 8eb514b2eb4..47c25513333 100644 --- a/ctdb/include/ctdb_protocol.h +++ b/ctdb/include/ctdb_protocol.h @@ -701,7 +701,7 @@ struct ctdb_statistics { /* * wire format for statistics history */ -struct ctdb_statistics_wire { +struct ctdb_statistics_list_old { uint32_t num; struct ctdb_statistics stats[1]; }; diff --git a/ctdb/server/ctdb_statistics.c b/ctdb/server/ctdb_statistics.c index 7987a318fac..623cb0accc2 100644 --- a/ctdb/server/ctdb_statistics.c +++ b/ctdb/server/ctdb_statistics.c @@ -71,9 +71,10 @@ int32_t ctdb_control_get_stat_history(struct ctdb_context *ctdb, TDB_DATA *outdata) { int len; - struct ctdb_statistics_wire *s; + struct ctdb_statistics_list_old *s; - len = offsetof(struct ctdb_statistics_wire, stats) + MAX_STAT_HISTORY*sizeof(struct ctdb_statistics); + len = offsetof(struct ctdb_statistics_list_old, stats) + + MAX_STAT_HISTORY*sizeof(struct ctdb_statistics); s = talloc_size(outdata, len); if (s == NULL) { diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 3775af40b45..17fc258feba 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -700,7 +700,7 @@ static int control_statistics_reset(struct ctdb_context *ctdb, int argc, const c static int control_stats(struct ctdb_context *ctdb, int argc, const char **argv) { int ret; - struct ctdb_statistics_wire *stats; + struct ctdb_statistics_list_old *stats; int i, num_records = -1; assert_single_node_only(); -- 2.11.4.GIT