ReadOnly: Rename the function ctdb_ltdb_fetch_readonly() to ctdb_ltdb_fetch_with_head...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 13 Sep 2011 08:38:20 +0000 (18:38 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 13 Sep 2011 08:38:20 +0000 (18:38 +1000)
client/ctdb_client.c
common/ctdb_ltdb.c
include/ctdb_private.h

index 89eeb4836a14bca81a422765b558854f1fb777e0..f2359cafc7375dec18af673e7bd8100eef300825 100644 (file)
@@ -756,7 +756,7 @@ again:
        talloc_set_destructor(h, fetch_lock_destructor);
 
        /* Check if record exists yet in the TDB */
-       ret = ctdb_ltdb_fetch_readonly(ctdb_db, key, &h->header, h, data);
+       ret = ctdb_ltdb_fetch_with_header(ctdb_db, key, &h->header, h, data);
        if (ret != 0) {
                ctdb_ltdb_unlock(ctdb_db, key);
                ret = ctdb_client_force_migration(ctdb_db, key);
@@ -829,7 +829,7 @@ again:
                        return NULL;
                }
 
-               ret = ctdb_ltdb_fetch_readonly(ctdb_db, key, &h->header, h, data);
+               ret = ctdb_ltdb_fetch_with_header(ctdb_db, key, &h->header, h, data);
                if (ret != 0) {
                        ctdb_ltdb_unlock(ctdb_db, key);
 
index 76274ceafba0bd8c96e6214a047200383ec4216a..e4662ac37fd294e481ca35b0f3e83a094a88e37b 100644 (file)
@@ -125,7 +125,7 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
   if the record does not exist, *header will be NULL
   and data = {0, NULL}
 */
-int ctdb_ltdb_fetch_readonly(struct ctdb_db_context *ctdb_db, 
+int ctdb_ltdb_fetch_with_header(struct ctdb_db_context *ctdb_db, 
                    TDB_DATA key, struct ctdb_ltdb_header *header, 
                    TALLOC_CTX *mem_ctx, TDB_DATA *data)
 {
index b093bf09acbc1f63eef0e8a0bcad38ad0c144023..7e5947301338eb738a08052285c8c09e1fc7cade 100644 (file)
@@ -671,7 +671,7 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
 int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key, 
                    struct ctdb_ltdb_header *header, TDB_DATA data);
 int ctdb_ltdb_delete(struct ctdb_db_context *ctdb_db, TDB_DATA key);
-int ctdb_ltdb_fetch_readonly(struct ctdb_db_context *ctdb_db, 
+int ctdb_ltdb_fetch_with_header(struct ctdb_db_context *ctdb_db, 
                    TDB_DATA key, struct ctdb_ltdb_header *header, 
                    TALLOC_CTX *mem_ctx, TDB_DATA *data);
 int32_t ctdb_control_start_persistent_update(struct ctdb_context *ctdb,