diff options
Diffstat (limited to 'ctdb/common/ctdb_daemon.c')
-rw-r--r-- | ctdb/common/ctdb_daemon.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c index bd83668b87..1813b8083b 100644 --- a/ctdb/common/ctdb_daemon.c +++ b/ctdb/common/ctdb_daemon.c @@ -223,69 +223,6 @@ static void daemon_request_fetch_lock(struct ctdb_client *client, } /* - called when the daemon gets a store unlock request from a client - - this would never block? - */ -static void daemon_request_store_unlock(struct ctdb_client *client, - struct ctdb_req_store_unlock *f) -{ - struct ctdb_db_context *ctdb_db; - struct ctdb_reply_store_unlock r; - uint32_t caller = ctdb_get_vnn(client->ctdb); - struct ctdb_ltdb_header header; - TDB_DATA key, data; - int res; - - ctdb_db = find_ctdb_db(client->ctdb, f->db_id); - if (ctdb_db == NULL) { - ctdb_set_error(client->ctdb, "Could not find database %i", - f->db_id); - res = -1; - goto done; - } - - /* write the data to ltdb */ - key.dsize = f->keylen; - key.dptr = &f->data[0]; - res = ctdb_ltdb_fetch(ctdb_db, key, &header, NULL, NULL); - if (res) { - ctdb_set_error(ctdb_db->ctdb, "Fetch of locally held record failed"); - res = -1; - goto done; - } - if (header.laccessor != caller) { - header.lacount = 0; - } - header.laccessor = caller; - header.lacount++; - data.dsize = f->datalen; - data.dptr = &f->data[f->keylen]; - res = ctdb_ltdb_store(ctdb_db, key, &header, data); - if ( res != 0) { - ctdb_set_error(ctdb_db->ctdb, "ctdb_call tdb_store failed\n"); - } - - -done: - /* now send the reply */ - ZERO_STRUCT(r); - - r.hdr.length = sizeof(r); - r.hdr.ctdb_magic = CTDB_MAGIC; - r.hdr.ctdb_version = CTDB_VERSION; - r.hdr.operation = CTDB_REPLY_STORE_UNLOCK; - r.hdr.reqid = f->hdr.reqid; - r.state = res; - - res = ctdb_queue_send(client->queue, (uint8_t *)&r.hdr, r.hdr.length); - if (res != 0) { - printf("Failed to queue a store unlock response\n"); - return; - } -} - -/* called when the daemon gets a connect wait request from a client */ static void daemon_request_connect_wait(struct ctdb_client *client, @@ -445,9 +382,6 @@ static void client_incoming_packet(struct ctdb_client *client, void *data, size_ case CTDB_REQ_FETCH_LOCK: daemon_request_fetch_lock(client, (struct ctdb_req_fetch_lock *)hdr); break; - case CTDB_REQ_STORE_UNLOCK: - daemon_request_store_unlock(client, (struct ctdb_req_store_unlock *)hdr); - break; default: printf("daemon: unrecognized operation:%d\n",hdr->operation); } |