summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-01-11 04:47:00 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-01-11 23:58:37 -0800
commit29b664f062795614417b9348f40503360f9f9c56 (patch)
tree5420805cb3c554332610e1fe838040dc79d396e6 /xlators/mgmt
parent89cbbee063243d84dc64b15b2e2f403be1ca226b (diff)
mgmt/Glusterd: make nfs.mem-factor settable through CLI
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2277 (Regression in Gluster NFS re-read performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2277
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 5224a91d4af..15c5274c8fc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -137,6 +137,7 @@ static struct volopt_map_entry glusterd_volopt_map[] = {
{"performance.stat-prefetch", "performance/stat-prefetch", "!perf", "on"}, /* NODOC */
{"nfs.enable-ino32", "nfs/server", "nfs.enable-ino32",},
+ {"nfs.mem-factor", "nfs/server", "nfs.mem-factor",},
{NULL, }
};
@@ -1244,6 +1245,7 @@ build_nfs_graph (glusterfs_graph_t *graph, dict_t *mod_dict)
xlator_t *nfsxl = NULL;
char *skey = NULL;
char *enable_ino32 = NULL;
+ char *mem_factor = NULL;
char volume_id[64] = {0,};
int ret = 0;
@@ -1316,6 +1318,21 @@ build_nfs_graph (glusterfs_graph_t *graph, dict_t *mod_dict)
goto out;
}
}
+
+ if (!dict_get (set_dict, "nfs.mem-factor")) {
+ ret = glusterd_volinfo_get (voliter,
+ "nfs.mem-factor",
+ &mem_factor);
+ if (ret)
+ goto out;
+ if (mem_factor) {
+ ret = dict_set_str (set_dict,
+ "nfs.mem-factor",
+ mem_factor);
+ if (ret)
+ goto out;
+ }
+ }
memset (&cgraph, 0, sizeof (cgraph));
ret = build_client_graph (&cgraph, voliter, set_dict);
if (ret)