summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorVijaikumar M <vmallika@redhat.com>2014-03-27 13:44:56 +0530
committerRajesh Joseph <rjoseph@redhat.com>2014-03-27 09:10:50 -0700
commitef32f3059b9dae18f9e76e0385eb01674dc6b94e (patch)
tree730b3c4f203581b1f51070b635078948c0b72a45 /xlators/mgmt
parent58dfda2a4e0ffad3a543fb47242c5cfdf0ea6bed (diff)
glusterd/snapshot:store related fix for the review comments in the upstream
Change-Id: I07da1f0a102b71c7c70dac83b1fe98d05607cb64 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7355 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-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 944652bd8..70b24aa81 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;
}