diff options
author | Dan Lambright <dlambrig@redhat.com> | 2015-09-10 15:25:55 -0400 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-09-11 17:12:55 -0700 |
commit | c90c03e9a22d4e21ac7570482255ab42d7ff188e (patch) | |
tree | 87b3a17855da6348947e6e648d43bf2f598e56c9 /libglusterfs | |
parent | c8b23d0135942c6d625e98666a00308e760b7afc (diff) |
cluster/tier fix bug with sql includes introduced by 12031
We accidentally introduced a bug where client translators have a
dependency on sql. This broke freebsd smoke tests. Fix is to
abstract from the client those dependencies.
Change-Id: I7152573a489bacc8f32e6eb139f9ff4408288f5b
BUG: 1260730
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/12155
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/gfdb/gfdb_data_store.c | 8 | ||||
-rw-r--r-- | libglusterfs/src/gfdb/gfdb_data_store.h | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_data_store.c b/libglusterfs/src/gfdb/gfdb_data_store.c index 9ea9150f3c3..e409e0ddc69 100644 --- a/libglusterfs/src/gfdb/gfdb_data_store.c +++ b/libglusterfs/src/gfdb/gfdb_data_store.c @@ -712,6 +712,12 @@ clear_files_heat (gfdb_conn_node_t *_conn_node) { return ret; } +static const +char *get_db_path_key() +{ + return GFDB_SQL_PARAM_DBPATH; +} + void get_gfdb_methods (gfdb_methods_t *methods) { methods->init_db = init_db; @@ -720,4 +726,6 @@ void get_gfdb_methods (gfdb_methods_t *methods) methods->find_recently_changed_files = find_recently_changed_files; methods->find_unchanged_for_time_freq = find_unchanged_for_time_freq; methods->find_recently_changed_files_freq = find_recently_changed_files_freq; + methods->get_db_path_key = get_db_path_key; } + diff --git a/libglusterfs/src/gfdb/gfdb_data_store.h b/libglusterfs/src/gfdb/gfdb_data_store.h index 5e46162b1ea..6a7ddcf7212 100644 --- a/libglusterfs/src/gfdb/gfdb_data_store.h +++ b/libglusterfs/src/gfdb/gfdb_data_store.h @@ -236,7 +236,8 @@ typedef int (*find_recently_changed_files_freq_t) (gfdb_conn_node_t *_conn_node, int read_freq_thresold, gf_boolean_t _clear_counters); - +typedef const +char *(*get_db_path_key_t)(); /*Libgfdb API Function: Clear the heat for all the files * @@ -256,7 +257,10 @@ typedef struct gfdb_methods_s { find_recently_changed_files_t find_recently_changed_files; find_unchanged_for_time_freq_t find_unchanged_for_time_freq; find_recently_changed_files_freq_t find_recently_changed_files_freq; + /* Do not expose dbpath directly. Expose it via an */ + /* access function: get_db_path_key(). */ char *dbpath; + get_db_path_key_t get_db_path_key; } gfdb_methods_t; void get_gfdb_methods (gfdb_methods_t *methods); |