summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-10-01 21:10:07 +0530
committerAnand Avati <avati@redhat.com>2012-10-04 15:16:00 -0700
commit748cf71a49d35b1a0366576521a2a7daa7fc3df3 (patch)
tree91039cef72ad2cf1bedbd0c28075194dd775f8a5 /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent6c2e3e6a651e0f507e812114ada00cc5f505b4f2 (diff)
glusterd: bring an option to change the transport-type of the volume.
'gluster volume set <VOL> transport [<tcp>|<rdma>|<tcp,rdma>]' is the command to change the transport type * also moved 'memory-accounting' volume set key into VME table * fixed a crash in 'volume set help' if the vme->type was wrong Change-Id: Ic4f7ef62277a22b561b05e94c1b1bf19a51d2095 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 797001 Reviewed-on: http://review.gluster.org/4008 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index acfe8386515..2784242feaa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -238,6 +238,8 @@ static struct volopt_map_entry glusterd_volopt_map[] = {
{"storage.linux-aio", "storage/posix", NULL, NULL, DOC, 0},
{"storage.owner-uid", "storage/posix", "brick-uid", NULL, DOC, 0},
{"storage.owner-gid", "storage/posix", "brick-gid", NULL, DOC, 0},
+ {"config.memory-accounting", "configuration", "!config", NULL, DOC, 0},
+ {"config.transport", "configuration", "!config", NULL, DOC, 0},
{NULL, }
};
@@ -2002,7 +2004,7 @@ glusterd_get_volopt_content (dict_t * ctx, gf_boolean_t xml_out)
char *xlator_type = NULL;
void *dl_handle = NULL;
- volume_opt_list_t vol_opt_handle = {{0},};
+ volume_opt_list_t vol_opt_handle = {{0},};
char *key = NULL;
struct volopt_map_entry *vme = NULL;
int ret = -1;
@@ -2034,10 +2036,12 @@ glusterd_get_volopt_content (dict_t * ctx, gf_boolean_t xml_out)
if (!xlator_type || strcmp (vme->voltype, xlator_type)){
ret = xlator_volopt_dynload (vme->voltype,
- &dl_handle,
- &vol_opt_handle);
- if (ret)
+ &dl_handle,
+ &vol_opt_handle);
+ if (ret) {
+ dl_handle = NULL;
continue;
+ }
}
ret = xlator_option_info_list (&vol_opt_handle, key,