diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index 3d337771c6a..79129412e13 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -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; diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 2a2b322a515..ece8f2d02c1 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -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; diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h index 159fe2e8d41..3eee08d7b42 100644 --- a/ctdb/include/ctdb_protocol.h +++ b/ctdb/include/ctdb_protocol.h @@ -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; diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c index 16fe53aa530..278e0ddc3a4 100644 --- a/ctdb/server/ctdb_call.c +++ b/ctdb/server/ctdb_call.c @@ -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; diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index ef5dd3f25c0..03266457235 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -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: diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index 7e5bf951696..d2d4f0a79b1 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -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++; } } diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index bbe425e13d3..95179a854ec 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -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;