From 94a5ce4e08e7891f07dbfe4c822ca4be5ab10965 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 13 Sep 2011 18:38:20 +1000 Subject: [PATCH] ReadOnly: Rename the function ctdb_ltdb_fetch_readonly() to ctdb_ltdb_fetch_with_header() since this is what it actually does. --- client/ctdb_client.c | 4 ++-- common/ctdb_ltdb.c | 2 +- include/ctdb_private.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/ctdb_client.c b/client/ctdb_client.c index 89eeb483..f2359caf 100644 --- a/client/ctdb_client.c +++ b/client/ctdb_client.c @@ -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); diff --git a/common/ctdb_ltdb.c b/common/ctdb_ltdb.c index 76274cea..e4662ac3 100644 --- a/common/ctdb_ltdb.c +++ b/common/ctdb_ltdb.c @@ -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) { diff --git a/include/ctdb_private.h b/include/ctdb_private.h index b093bf09..7e594730 100644 --- a/include/ctdb_private.h +++ b/include/ctdb_private.h @@ -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, -- 2.34.1