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) {
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;
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;
uint32_t reqid;
};
-struct ctdb_req_call {
+struct ctdb_req_call_old {
struct ctdb_req_header hdr;
uint32_t flags;
uint32_t db_id;
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);
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)
{
*/
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;
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;
{
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;
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;
};
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;
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;
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:
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++;
}
}
*/
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;
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;
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;
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];
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;
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;