diff options
author | Avra Sengupta <asengupt@redhat.com> | 2014-11-24 08:24:24 +0000 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-01-08 01:14:43 -0800 |
commit | c71dc72b7c4df6e1ea7193227d69ce0db18b5b93 (patch) | |
tree | 05f3b2b788e3ba593c75cafd450a22dbf2fdf9c5 /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 5e808f3a5dfa3fba58ff0206775de2653d62b2de (diff) |
glusterd/uss: Create rebalance volfile.
Create a new rebalance volfile, which will not contain
snap-view client translators, irrespective of the status
of USS.
This volfile, will be created and regenerated everytime
the fuse-volfile is generated, and will be consumed
by the rebalance process.
Change-Id: I514a8e88d06c0b8fb6949c3a3e6dc4dbe55e38af
BUG: 1175758
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/9190
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/9339
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index d4521679d86..0589704bc48 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -13114,6 +13114,19 @@ out: return ret; } +void +glusterd_get_rebalance_volfile (glusterd_volinfo_t *volinfo, + char *path, int path_len) +{ + char workdir[PATH_MAX] = {0,}; + glusterd_conf_t *priv = THIS->private; + + GLUSTERD_GET_VOLUME_DIR (workdir, volinfo, priv); + + snprintf (path, path_len, "%s/%s-rebalance.vol", workdir, + volinfo->volname); +} + /* Snapd functions */ int glusterd_is_snapd_enabled (glusterd_volinfo_t *volinfo) |