summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 944652b..70b24aa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -666,8 +666,7 @@ glusterd_store_create_snap_dir (glusterd_snap_t *snap)
GF_ASSERT (priv);
GF_ASSERT (snap);
- snprintf (snapdirpath, PATH_MAX, "%s/snaps/%s", priv->workdir,
- snap->snapname);
+ GLUSTERD_GET_SNAP_DIR (snapdirpath, snap, priv);
ret = mkdir_p (snapdirpath, 0755, _gf_true);
if (ret) {
@@ -981,8 +980,8 @@ glusterd_store_node_state_write (int fd, glusterd_volinfo_t *volinfo)
GF_ASSERT (volinfo);
if (volinfo->rebal.defrag_cmd == GF_DEFRAG_CMD_STATUS) {
- ret = 0;
- goto out;
+ ret = 0;
+ goto out;
}
snprintf (buf, sizeof (buf), "%d", volinfo->rebal.defrag_cmd);
@@ -1396,6 +1395,8 @@ out:
return ret;
}
+/*TODO: cleanup the duplicate code and implement a generic function for
+ * deleting snap/volume depending on the parameter flag */
int32_t
glusterd_store_delete_snap (glusterd_snap_t *snap)
{
@@ -1657,7 +1658,8 @@ out:
}
int
-glusterd_retrieve_sys_snap_max_limit (xlator_t *this, uint64_t *limit, char *key)
+glusterd_retrieve_sys_snap_max_limit (xlator_t *this, uint64_t *limit,
+ char *key)
{
char *limit_str = NULL;
glusterd_conf_t *priv = NULL;
@@ -2174,7 +2176,7 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo,
ret = gf_store_handle_retrieve (path, &volinfo->shandle);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "snap handle is NULL");
+ gf_log (this->name, GF_LOG_ERROR, "volinfo handle is NULL");
goto out;
}