ctdb-daemon: Rename struct ctdb_req_call to ctdb_req_call_old
authorAmitay Isaacs <amitay@gmail.com>
Thu, 29 Oct 2015 05:26:29 +0000 (16:26 +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_private.h
ctdb/include/ctdb_protocol.h
ctdb/server/ctdb_call.c
ctdb/server/ctdb_daemon.c
ctdb/server/ctdbd.c
source3/lib/ctdbd_conn.c

index 3d337771c6aa17af24f797ac96ed560326f929c8..79129412e13e799eb8a40a2a4f534acb2653a1aa 100644 (file)
@@ -411,7 +411,7 @@ struct ctdb_client_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db,
        TDB_DATA data;
        int ret;
        size_t len;
-       struct ctdb_req_call *c;
+       struct ctdb_req_call_old *c;
 
        /* if the domain socket is not yet open, open it */
        if (ctdb->daemon.sd==-1) {
@@ -451,8 +451,8 @@ struct ctdb_client_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db,
                return NULL;
        }
 
-       len = offsetof(struct ctdb_req_call, data) + call->key.dsize + call->call_data.dsize;
-       c = ctdbd_allocate_pkt(ctdb, state, CTDB_REQ_CALL, len, struct ctdb_req_call);
+       len = offsetof(struct ctdb_req_call_old, data) + call->key.dsize + call->call_data.dsize;
+       c = ctdbd_allocate_pkt(ctdb, state, CTDB_REQ_CALL, len, struct ctdb_req_call_old);
        if (c == NULL) {
                DEBUG(DEBUG_ERR, (__location__ " failed to allocate packet\n"));
                return NULL;
index 2a2b322a515da716e604332f375d03f75045e6f4..ece8f2d02c16edff76f79259a796db956a57a645 100644 (file)
@@ -477,7 +477,7 @@ struct ctdb_call_state {
        struct ctdb_call_state *next, *prev;
        enum call_state state;
        uint32_t reqid;
-       struct ctdb_req_call *c;
+       struct ctdb_req_call_old *c;
        struct ctdb_db_context *ctdb_db;
        const char *errmsg;
        struct ctdb_call *call;
index 159fe2e8d41410b70ec5afaab4e4d230f9947029..3eee08d7b42c2f062153de0ea4f5a7078ef4310c 100644 (file)
@@ -429,7 +429,7 @@ struct ctdb_req_header {
        uint32_t reqid;
 };
 
-struct ctdb_req_call {
+struct ctdb_req_call_old {
        struct ctdb_req_header hdr;
        uint32_t flags;
        uint32_t db_id;
index 16fe53aa5303201395ad38b1725cdecc3407d959..278e0ddc3a4434d18bfc9140881f22c12bf024a8 100644 (file)
@@ -132,7 +132,7 @@ static void ctdb_send_error(struct ctdb_context *ctdb,
 static void ctdb_call_send_redirect(struct ctdb_context *ctdb,
                                    struct ctdb_db_context *ctdb_db,
                                    TDB_DATA key,
-                                   struct ctdb_req_call *c, 
+                                   struct ctdb_req_call_old *c, 
                                    struct ctdb_ltdb_header *header)
 {
        uint32_t lmaster = ctdb_lmaster(ctdb, &key);
@@ -224,7 +224,7 @@ static void ctdb_send_dmaster_reply(struct ctdb_db_context *ctdb_db,
   CTDB_REPLY_DMASTER to the new dmaster
 */
 static void ctdb_call_send_dmaster(struct ctdb_db_context *ctdb_db, 
-                                  struct ctdb_req_call *c, 
+                                  struct ctdb_req_call_old *c, 
                                   struct ctdb_ltdb_header *header,
                                   TDB_DATA *key, TDB_DATA *data)
 {
@@ -887,7 +887,7 @@ sort_keys:
 */
 void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
 {
-       struct ctdb_req_call *c = (struct ctdb_req_call *)hdr;
+       struct ctdb_req_call_old *c = (struct ctdb_req_call_old *)hdr;
        TDB_DATA data;
        struct ctdb_reply_call *r;
        int ret, len;
@@ -1501,9 +1501,9 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(struct ctdb_db_context *ctd
        state->ctdb_db = ctdb_db;
        talloc_set_destructor(state, ctdb_call_destructor);
 
-       len = offsetof(struct ctdb_req_call, data) + call->key.dsize + call->call_data.dsize;
+       len = offsetof(struct ctdb_req_call_old, data) + call->key.dsize + call->call_data.dsize;
        state->c = ctdb_transport_allocate(ctdb, state, CTDB_REQ_CALL, len, 
-                                          struct ctdb_req_call);
+                                          struct ctdb_req_call_old);
        CTDB_NO_MEMORY_NULL(ctdb, state->c);
        state->c->hdr.destnode  = header->dmaster;
 
@@ -1632,7 +1632,7 @@ static int deferred_call_destructor(struct revokechild_deferred_call *deferred_c
 {
        struct ctdb_context *ctdb = deferred_call->ctdb;
        struct revokechild_requeue_handle *requeue_handle = talloc(ctdb, struct revokechild_requeue_handle);
-       struct ctdb_req_call *c = (struct ctdb_req_call *)deferred_call->hdr;
+       struct ctdb_req_call_old *c = (struct ctdb_req_call_old *)deferred_call->hdr;
 
        requeue_handle->ctdb = ctdb;
        requeue_handle->hdr  = deferred_call->hdr;
index ef5dd3f25c0187cb649b213219771ad04e9ad9d3..03266457235f73c8c9e257b73b8be3522b057640 100644 (file)
@@ -416,7 +416,7 @@ static void daemon_incoming_packet_wrap(void *p, struct ctdb_req_header *hdr)
 
 struct ctdb_deferred_fetch_call {
        struct ctdb_deferred_fetch_call *next, *prev;
-       struct ctdb_req_call *c;
+       struct ctdb_req_call_old *c;
        struct ctdb_daemon_packet_wrap *w;
 };
 
@@ -552,7 +552,7 @@ static int setup_deferred_fetch_locks(struct ctdb_db_context *ctdb_db, struct ct
    if it is, make this call deferred to be reprocessed later when
    the in-flight fetch completes.
 */
-static int requeue_duplicate_fetch(struct ctdb_db_context *ctdb_db, struct ctdb_client *client, TDB_DATA key, struct ctdb_req_call *c)
+static int requeue_duplicate_fetch(struct ctdb_db_context *ctdb_db, struct ctdb_client *client, TDB_DATA key, struct ctdb_req_call_old *c)
 {
        uint32_t *k;
        struct ctdb_deferred_fetch_queue *dfq;
@@ -601,7 +601,7 @@ static int requeue_duplicate_fetch(struct ctdb_db_context *ctdb_db, struct ctdb_
   from a local client over the unix domain socket
  */
 static void daemon_request_call_from_client(struct ctdb_client *client, 
-                                           struct ctdb_req_call *c)
+                                           struct ctdb_req_call_old *c)
 {
        struct ctdb_call_state *state;
        struct ctdb_db_context *ctdb_db;
@@ -840,7 +840,7 @@ static void daemon_incoming_packet(void *p, struct ctdb_req_header *hdr)
        switch (hdr->operation) {
        case CTDB_REQ_CALL:
                CTDB_INCREMENT_STAT(ctdb, client.req_call);
-               daemon_request_call_from_client(client, (struct ctdb_req_call *)hdr);
+               daemon_request_call_from_client(client, (struct ctdb_req_call_old *)hdr);
                break;
 
        case CTDB_REQ_MESSAGE:
index 7e5bf951696d2c9eb1a30b15a9fed8389ae86b87..d2d4f0a79b11b3d0dcdcad184b3e2dff36360259 100644 (file)
@@ -92,7 +92,7 @@ static void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t len
        if (ctdb_validate_pnn(ctdb, hdr->srcnode)) {
                /* as a special case, redirected calls don't increment the rx_cnt */
                if (hdr->operation != CTDB_REQ_CALL ||
-                   ((struct ctdb_req_call *)hdr)->hopcount == 0) {
+                   ((struct ctdb_req_call_old *)hdr)->hopcount == 0) {
                        ctdb->nodes[hdr->srcnode]->rx_cnt++;
                }
        }
index bbe425e13d3ca5a667c51914a62642e816aa20c4..95179a854ec0e1de48bfea8e411e23c79d42716d 100644 (file)
@@ -918,7 +918,7 @@ int ctdbd_db_attach(struct ctdbd_connection *conn,
  */
 int ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id, TDB_DATA key)
 {
-       struct ctdb_req_call req;
+       struct ctdb_req_call_old req;
        struct ctdb_req_header *hdr;
        struct iovec iov[2];
        ssize_t nwritten;
@@ -926,7 +926,7 @@ int ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id, TDB_DATA key)
 
        ZERO_STRUCT(req);
 
-       req.hdr.length = offsetof(struct ctdb_req_call, data) + key.dsize;
+       req.hdr.length = offsetof(struct ctdb_req_call_old, data) + key.dsize;
        req.hdr.ctdb_magic   = CTDB_MAGIC;
        req.hdr.ctdb_version = CTDB_PROTOCOL;
        req.hdr.operation    = CTDB_REQ_CALL;
@@ -940,7 +940,7 @@ int ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id, TDB_DATA key)
        ctdb_packet_dump(&req.hdr);
 
        iov[0].iov_base = &req;
-       iov[0].iov_len = offsetof(struct ctdb_req_call, data);
+       iov[0].iov_len = offsetof(struct ctdb_req_call_old, data);
        iov[1].iov_base = key.dptr;
        iov[1].iov_len = key.dsize;
 
@@ -976,7 +976,7 @@ int ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,
                               void *private_data),
                void *private_data)
 {
-       struct ctdb_req_call req;
+       struct ctdb_req_call_old req;
        struct ctdb_req_header *hdr = NULL;
        struct ctdb_reply_call *reply;
        struct iovec iov[2];
@@ -988,7 +988,7 @@ int ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,
 
        ZERO_STRUCT(req);
 
-       req.hdr.length = offsetof(struct ctdb_req_call, data) + key.dsize;
+       req.hdr.length = offsetof(struct ctdb_req_call_old, data) + key.dsize;
        req.hdr.ctdb_magic   = CTDB_MAGIC;
        req.hdr.ctdb_version = CTDB_PROTOCOL;
        req.hdr.operation    = CTDB_REQ_CALL;
@@ -999,7 +999,7 @@ int ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,
        req.keylen           = key.dsize;
 
        iov[0].iov_base = &req;
-       iov[0].iov_len = offsetof(struct ctdb_req_call, data);
+       iov[0].iov_len = offsetof(struct ctdb_req_call_old, data);
        iov[1].iov_base = key.dptr;
        iov[1].iov_len = key.dsize;