summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2014-03-28 18:32:26 +0530
committerRajesh Joseph <rjoseph@redhat.com>2014-03-28 06:11:47 -0700
commit4684cc67accdffd3d999d1528f6306e2b98b0654 (patch)
tree66383fc93ffffad612f8fbe570115b95b6cd7069
parent3bca32ddf05aa97b67722e0c6b64eb0a24c068da (diff)
glusterd/snapshot: fixed review comment for upstream restsore
code cleanup Change-Id: I4965cc6fb9f8310cb1075047175f5e1139dd2aea Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/7366 Reviewed-by: Avra Sengupta <asengupt@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 621e2fd..b104971 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3178,8 +3178,7 @@ glusterd_generate_brick_volfile (glusterd_volinfo_t *volinfo,
static int
glusterd_generate_snap_brick_volfile (glusterd_volinfo_t *volinfo,
glusterd_brickinfo_t *brickinfo,
- glusterd_volinfo_t *snap_volinfo,
- gf_boolean_t vol_restore)
+ glusterd_volinfo_t *snap_volinfo)
{
volgen_graph_t graph = {0,};
char filename[PATH_MAX] = {0,};
@@ -3193,15 +3192,7 @@ glusterd_generate_snap_brick_volfile (glusterd_volinfo_t *volinfo,
GF_ASSERT (brickinfo);
GLUSTERD_REMOVE_SLASH_FROM_PATH (brickinfo->path, brick);
- /* If the brick volfile is generated as part of a restore
- * operation then we should be generating the brick volfile
- * in the origin volume folder instead of snap volume folder.
- */
- if (vol_restore) {
- GLUSTERD_GET_VOLUME_DIR (path, volinfo, priv);
- } else {
- GLUSTERD_GET_VOLUME_DIR (path, snap_volinfo, priv);
- }
+ GLUSTERD_GET_VOLUME_DIR (path, snap_volinfo, priv);
snprintf (filename, PATH_MAX, "%s/%s.%s.%s.vol",
path, snap_volinfo->volname,
@@ -3299,8 +3290,7 @@ generate_snap_brick_volfiles (glusterd_volinfo_t *volinfo,
ret = glusterd_generate_snap_brick_volfile (volinfo,
brickinfo,
- snap_volinfo,
- _gf_false);
+ snap_volinfo);
if (ret)
goto out;
}