1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

ctdb-daemon: Rename struct ctdb_req_call to ctdb_req_call_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2015-10-29 16:26:29 +11:00 committed by Martin Schwenke
parent f55889d2c9
commit e0c42c5698
7 changed files with 22 additions and 22 deletions

View File

@ -411,7 +411,7 @@ struct ctdb_client_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db,
TDB_DATA data; TDB_DATA data;
int ret; int ret;
size_t len; 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 the domain socket is not yet open, open it */
if (ctdb->daemon.sd==-1) { 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; return NULL;
} }
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;
c = ctdbd_allocate_pkt(ctdb, state, CTDB_REQ_CALL, len, struct ctdb_req_call); c = ctdbd_allocate_pkt(ctdb, state, CTDB_REQ_CALL, len, struct ctdb_req_call_old);
if (c == NULL) { if (c == NULL) {
DEBUG(DEBUG_ERR, (__location__ " failed to allocate packet\n")); DEBUG(DEBUG_ERR, (__location__ " failed to allocate packet\n"));
return NULL; return NULL;

View File

@ -477,7 +477,7 @@ struct ctdb_call_state {
struct ctdb_call_state *next, *prev; struct ctdb_call_state *next, *prev;
enum call_state state; enum call_state state;
uint32_t reqid; uint32_t reqid;
struct ctdb_req_call *c; struct ctdb_req_call_old *c;
struct ctdb_db_context *ctdb_db; struct ctdb_db_context *ctdb_db;
const char *errmsg; const char *errmsg;
struct ctdb_call *call; struct ctdb_call *call;

View File

@ -429,7 +429,7 @@ struct ctdb_req_header {
uint32_t reqid; uint32_t reqid;
}; };
struct ctdb_req_call { struct ctdb_req_call_old {
struct ctdb_req_header hdr; struct ctdb_req_header hdr;
uint32_t flags; uint32_t flags;
uint32_t db_id; uint32_t db_id;

View File

@ -132,7 +132,7 @@ static void ctdb_send_error(struct ctdb_context *ctdb,
static void ctdb_call_send_redirect(struct ctdb_context *ctdb, static void ctdb_call_send_redirect(struct ctdb_context *ctdb,
struct ctdb_db_context *ctdb_db, struct ctdb_db_context *ctdb_db,
TDB_DATA key, TDB_DATA key,
struct ctdb_req_call *c, struct ctdb_req_call_old *c,
struct ctdb_ltdb_header *header) struct ctdb_ltdb_header *header)
{ {
uint32_t lmaster = ctdb_lmaster(ctdb, &key); 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 CTDB_REPLY_DMASTER to the new dmaster
*/ */
static void ctdb_call_send_dmaster(struct ctdb_db_context *ctdb_db, 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, struct ctdb_ltdb_header *header,
TDB_DATA *key, TDB_DATA *data) 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) 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; TDB_DATA data;
struct ctdb_reply_call *r; struct ctdb_reply_call *r;
int ret, len; 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; state->ctdb_db = ctdb_db;
talloc_set_destructor(state, ctdb_call_destructor); 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, 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); CTDB_NO_MEMORY_NULL(ctdb, state->c);
state->c->hdr.destnode = header->dmaster; 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 ctdb_context *ctdb = deferred_call->ctdb;
struct revokechild_requeue_handle *requeue_handle = talloc(ctdb, struct revokechild_requeue_handle); 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->ctdb = ctdb;
requeue_handle->hdr = deferred_call->hdr; requeue_handle->hdr = deferred_call->hdr;

View 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 {
struct ctdb_deferred_fetch_call *next, *prev; struct ctdb_deferred_fetch_call *next, *prev;
struct ctdb_req_call *c; struct ctdb_req_call_old *c;
struct ctdb_daemon_packet_wrap *w; 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 if it is, make this call deferred to be reprocessed later when
the in-flight fetch completes. 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; uint32_t *k;
struct ctdb_deferred_fetch_queue *dfq; 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 from a local client over the unix domain socket
*/ */
static void daemon_request_call_from_client(struct ctdb_client *client, 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_call_state *state;
struct ctdb_db_context *ctdb_db; 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) { switch (hdr->operation) {
case CTDB_REQ_CALL: case CTDB_REQ_CALL:
CTDB_INCREMENT_STAT(ctdb, client.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; break;
case CTDB_REQ_MESSAGE: case CTDB_REQ_MESSAGE:

View 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)) { if (ctdb_validate_pnn(ctdb, hdr->srcnode)) {
/* as a special case, redirected calls don't increment the rx_cnt */ /* as a special case, redirected calls don't increment the rx_cnt */
if (hdr->operation != CTDB_REQ_CALL || 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++; ctdb->nodes[hdr->srcnode]->rx_cnt++;
} }
} }

View 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) 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 ctdb_req_header *hdr;
struct iovec iov[2]; struct iovec iov[2];
ssize_t nwritten; ssize_t nwritten;
@ -926,7 +926,7 @@ int ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id, TDB_DATA key)
ZERO_STRUCT(req); 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_magic = CTDB_MAGIC;
req.hdr.ctdb_version = CTDB_PROTOCOL; req.hdr.ctdb_version = CTDB_PROTOCOL;
req.hdr.operation = CTDB_REQ_CALL; 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); ctdb_packet_dump(&req.hdr);
iov[0].iov_base = &req; 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_base = key.dptr;
iov[1].iov_len = key.dsize; 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),
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_req_header *hdr = NULL;
struct ctdb_reply_call *reply; struct ctdb_reply_call *reply;
struct iovec iov[2]; struct iovec iov[2];
@ -988,7 +988,7 @@ int ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,
ZERO_STRUCT(req); 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_magic = CTDB_MAGIC;
req.hdr.ctdb_version = CTDB_PROTOCOL; req.hdr.ctdb_version = CTDB_PROTOCOL;
req.hdr.operation = CTDB_REQ_CALL; 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; req.keylen = key.dsize;
iov[0].iov_base = &req; 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_base = key.dptr;
iov[1].iov_len = key.dsize; iov[1].iov_len = key.dsize;