diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
commit | 0de07f4189cbd191a765c60ed3d7c72f72112e68 (patch) | |
tree | 83781a0df06c9110c6f3db12caad23ea00832b53 /xlators/mgmt/glusterd/src/glusterd-volgen.c | |
parent | c28972ea53cc7cdb91c7aac01754dd7f0b66e1a7 (diff) | |
parent | 9f45d0f6212d6d5c96dafc4aba73d9d12b39c3d6 (diff) |
Merge branch 'upstream' into merge
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Conflicts:
api/src/glfs-fops.c
libglusterfs/src/syncop.c
libglusterfs/src/syncop.h
Change-Id: I8c3fa7a20fb167d9e6bc2749e177c0c8b366827b
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 102bd9d8b..86bdc754a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1723,6 +1723,7 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo = NULL; char changelog_basepath[PATH_MAX] = {0,}; gf_boolean_t quota_enabled = _gf_true; + gf_boolean_t pgfid_feat = _gf_false; char *value = NULL; brickinfo = param; @@ -1749,6 +1750,15 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, goto out; } + ret = glusterd_volinfo_get (volinfo, + "update-link-count-parent", + &value); + if (value) { + ret = gf_string2boolean (value, &pgfid_feat); + if (ret) + goto out; + } + xl = volgen_graph_add (graph, "storage/posix", volname); if (!xl) return -1; @@ -1762,9 +1772,9 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, if (ret) return -1; - if (quota_enabled) + if (quota_enabled || pgfid_feat) xlator_set_option (xl, "update-link-count-parent", - value); + "on"); ret = check_and_add_debug_xl (graph, set_dict, volname, "posix"); @@ -1973,13 +1983,16 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, } /* Check for compress volume option, and add it to the graph on server side */ - if (dict_get_str_boolean (set_dict, "network.compression", 0)) { + ret = dict_get_str_boolean (set_dict, "network.compression", 0); + if (ret == -1) + goto out; + if (ret) { xl = volgen_graph_add (graph, "features/cdc", volname); if (!xl) { ret = -1; goto out; } - ret = dict_set_str (set_dict, "network.compression.mode", "server"); + ret = xlator_set_option (xl, "mode", "server"); if (ret) goto out; } @@ -2298,7 +2311,7 @@ glusterd_get_volopt_content (dict_t * ctx, gf_boolean_t xml_out) int ret = -1; char *def_val = NULL; char *descr = NULL; - char output_string[25600] = {0, }; + char output_string[51200] = {0, }; char *output = NULL; char tmp_str[2048] = {0, }; #if (HAVE_LIB_XML) @@ -2854,16 +2867,18 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, goto out; /* Check for compress volume option, and add it to the graph on client side */ - if (dict_get_str_boolean (set_dict, "network.compression", 0)) { + ret = dict_get_str_boolean (set_dict, "network.compression", 0); + if (ret == -1) + goto out; + if (ret) { xl = volgen_graph_add (graph, "features/cdc", volname); if (!xl) { ret = -1; goto out; } - ret = dict_set_str (set_dict, "network.compression.mode", "client"); + ret = xlator_set_option (xl, "mode", "client"); if (ret) goto out; - } ret = glusterd_volinfo_get_boolean (volinfo, "features.encryption"); |