ctdb-daemon: Rename struct ctdb_db_statistics to ctdb_db_statistics_old
authorAmitay Isaacs <amitay@gmail.com>
Thu, 29 Oct 2015 06:33:09 +0000 (17:33 +1100)
committerMartin Schwenke <martins@samba.org>
Tue, 3 Nov 2015 23:47:14 +0000 (00:47 +0100)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/client/ctdb_client.c
ctdb/include/ctdb_client.h
ctdb/include/ctdb_private.h
ctdb/include/ctdb_protocol.h
ctdb/server/ctdb_ltdb_server.c
ctdb/tools/ctdb.c

index 8504673a72c4e84d33035033364de5ced6733ed7..90b7891f9658011688a35254ba1779c50c635a7e 100644 (file)
@@ -1292,12 +1292,12 @@ int ctdb_ctrl_statistics(struct ctdb_context *ctdb, uint32_t destnode, struct ct
  * get db statistics
  */
 int ctdb_ctrl_dbstatistics(struct ctdb_context *ctdb, uint32_t destnode, uint32_t dbid,
-                          TALLOC_CTX *mem_ctx, struct ctdb_db_statistics **dbstat)
+                          TALLOC_CTX *mem_ctx, struct ctdb_db_statistics_old **dbstat)
 {
        int ret;
        TDB_DATA indata, outdata;
        int32_t res;
-       struct ctdb_db_statistics *wire, *s;
+       struct ctdb_db_statistics_old *wire, *s;
        char *ptr;
        int i;
 
@@ -1311,21 +1311,21 @@ int ctdb_ctrl_dbstatistics(struct ctdb_context *ctdb, uint32_t destnode, uint32_
                return -1;
        }
 
-       if (outdata.dsize < offsetof(struct ctdb_db_statistics, hot_keys_wire)) {
+       if (outdata.dsize < offsetof(struct ctdb_db_statistics_old, hot_keys_wire)) {
                DEBUG(DEBUG_ERR,(__location__ " Wrong dbstatistics size %zi - expected >= %lu\n",
                                 outdata.dsize,
                                 (long unsigned int)sizeof(struct ctdb_statistics)));
                return -1;
        }
 
-       s = talloc_zero(mem_ctx, struct ctdb_db_statistics);
+       s = talloc_zero(mem_ctx, struct ctdb_db_statistics_old);
        if (s == NULL) {
                talloc_free(outdata.dptr);
                CTDB_NO_MEMORY(ctdb, s);
        }
 
-       wire = (struct ctdb_db_statistics *)outdata.dptr;
-       memcpy(s, wire, offsetof(struct ctdb_db_statistics, hot_keys_wire));
+       wire = (struct ctdb_db_statistics_old *)outdata.dptr;
+       memcpy(s, wire, offsetof(struct ctdb_db_statistics_old, hot_keys_wire));
        ptr = &wire->hot_keys_wire[0];
        for (i=0; i<wire->num_hot_keys; i++) {
                s->hot_keys[i].key.dptr = talloc_size(mem_ctx, s->hot_keys[i].key.dsize);
index b21bcee282c96551389283ce8456f5e930b2bd24..6e34df0f4526ff33a9ef56ba5fed3d4d265bcf73 100644 (file)
@@ -146,7 +146,7 @@ int ctdb_ctrl_statistics(struct ctdb_context *ctdb, uint32_t destnode,
                         struct ctdb_statistics *status);
 int ctdb_ctrl_dbstatistics(struct ctdb_context *ctdb, uint32_t destnode,
                           uint32_t dbid, TALLOC_CTX *mem_ctx,
-                          struct ctdb_db_statistics **dbstat);
+                          struct ctdb_db_statistics_old **dbstat);
 
 int ctdb_ctrl_shutdown(struct ctdb_context *ctdb, struct timeval timeout,
                       uint32_t destnode);
index 63b85eb6129f14516a151fed5d5a3167d1e4dded..ebcac9e5b9d55fcabbc87fecf3cdd3fa2688857d 100644 (file)
@@ -431,7 +431,7 @@ struct ctdb_db_context {
        struct trbt_tree *deferred_fetch;
        struct trbt_tree *defer_dmaster;
 
-       struct ctdb_db_statistics statistics;
+       struct ctdb_db_statistics_old statistics;
 
        struct lock_context *lock_current;
        struct lock_context *lock_pending;
index 47c25513333b54a82da824b02cdcd753b9345472..ab9678977a6b635fd75c88f40097f5104d8e9211 100644 (file)
@@ -709,7 +709,7 @@ struct ctdb_statistics_list_old {
 /*
  * db statistics
  */
-struct ctdb_db_statistics {
+struct ctdb_db_statistics_old {
        struct {
                uint32_t num_calls;
                uint32_t num_current;
index 43181dc2afe824d9926ba5041a38cebf00c6d0f3..585135817b25ebd68634882aacbfaf38dee1be00 100644 (file)
@@ -1628,7 +1628,7 @@ int ctdb_set_db_sticky(struct ctdb_context *ctdb, struct ctdb_db_context *ctdb_d
 
 void ctdb_db_statistics_reset(struct ctdb_db_context *ctdb_db)
 {
-       struct ctdb_db_statistics *s = &ctdb_db->statistics;
+       struct ctdb_db_statistics_old *s = &ctdb_db->statistics;
        int i;
 
        for (i=0; i<MAX_HOT_KEYS; i++) {
@@ -1645,7 +1645,7 @@ int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,
                                TDB_DATA *outdata)
 {
        struct ctdb_db_context *ctdb_db;
-       struct ctdb_db_statistics *stats;
+       struct ctdb_db_statistics_old *stats;
        int i;
        int len;
        char *ptr;
@@ -1656,7 +1656,7 @@ int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,
                return -1;
        }
 
-       len = offsetof(struct ctdb_db_statistics, hot_keys_wire);
+       len = offsetof(struct ctdb_db_statistics_old, hot_keys_wire);
        for (i = 0; i < MAX_HOT_KEYS; i++) {
                len += ctdb_db->statistics.hot_keys[i].key.dsize;
        }
@@ -1668,7 +1668,7 @@ int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,
        }
 
        memcpy(stats, &ctdb_db->statistics,
-              offsetof(struct ctdb_db_statistics, hot_keys_wire));
+              offsetof(struct ctdb_db_statistics_old, hot_keys_wire));
 
        stats->num_hot_keys = MAX_HOT_KEYS;
 
index 17fc258febaa50e4bc79080afd36ca64f7dfef55..9994f84e9d4e9ce2e1b7fc9f2ea5b1904188fd4e 100644 (file)
@@ -733,7 +733,7 @@ static int control_stats(struct ctdb_context *ctdb, int argc, const char **argv)
 static int control_dbstatistics(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
-       struct ctdb_db_statistics *dbstat;
+       struct ctdb_db_statistics_old *dbstat;
        int i;
        uint32_t db_id;
        int num_hot_keys;