@@ -28,6 +28,7 @@
extern rados_t rados_recov_cluster;
extern rados_ioctx_t rados_recov_io_ctx;
extern char rados_recov_oid[NI_MAXHOST];
+extern char rados_recov_old_oid[NI_MAXHOST];
struct rados_kv_parameter {
/** Connection to ceph cluster */
@@ -51,10 +52,18 @@ typedef struct pop_args {
int rados_kv_connect(rados_ioctx_t *io_ctx, const char *userid,
const char *conf, const char *pool);
void rados_kv_shutdown(void);
+int rados_kv_put(char *key, char *val, char *object);
int rados_kv_get(char *key, char **val, size_t *val_len, char *object);
+void rados_kv_add_clid(nfs_client_id_t *clientid);
+void rados_kv_rm_clid(nfs_client_id_t *clientid);
+void rados_kv_add_revoke_fh(nfs_client_id_t *delr_clid, nfs_fh4 *delr_handle);
void rados_kv_create_key(nfs_client_id_t *clientid, char *key);
void rados_kv_create_val(nfs_client_id_t *clientid, char *val);
int rados_kv_traverse(pop_clid_entry_t pop_func, pop_args_t pop_args,
const char *object);
void rados_kv_append_val_rdfh(char *val, char *rdfh, int rdfh_len);
+void rados_kv_pop_clid_entry(char *key, char *val,
+ add_clid_entry_hook add_clid_entry,
+ add_rfh_entry_hook add_rfh_entry,
+ bool old, bool takeover);
#endif /* _RECOVERY_RADOS_H */
@@ -21,7 +21,7 @@
static rados_t clnt;
rados_ioctx_t rados_recov_io_ctx;
char rados_recov_oid[NI_MAXHOST];
-static char rados_recov_old_oid[NI_MAXHOST];
+char rados_recov_old_oid[NI_MAXHOST];
struct rados_kv_parameter rados_kv_param;
@@ -132,7 +132,7 @@ void rados_kv_create_val(nfs_client_id_t *clientid, char *val)
clientid->cid_recov_tag);
}
-static int rados_kv_put(char *key, char *val, char *object)
+int rados_kv_put(char *key, char *val, char *object)
{
int ret;
char *keys[1];
@@ -444,7 +444,7 @@ void rados_kv_rm_clid(nfs_client_id_t *clientid)
clientid->cid_recov_tag = NULL;
}
-static void rados_kv_pop_clid_entry(char *key,
+void rados_kv_pop_clid_entry(char *key,
char *val,
add_clid_entry_hook add_clid_entry,
add_rfh_entry_hook add_rfh_entry,