summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2014-06-06 12:45:12 +0200
committerVijay Bellur <vbellur@redhat.com>2014-06-09 00:27:07 -0700
commit4215d071cec4fc8a62ca4fd6212d83f931838829 (patch)
tree5820bfa6d6e9e3cb20ab4a94643faca62f3fc971 /rpc
parent4e1ca1be6c26846e876d4181c9f2adea37856ded (diff)
gNFS: Make NFS DRC off by default
DRC in NFS causes memory bloat and there are known memory corruptions. It would be good to disable drc by default till the feature is stable. Change-Id: I93db6ef5298672c56fb117370bb582a5e5550b17 BUG: 1105524 Original-patch-by: Santosh Kumar Pradhan <spradhan@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/8004 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-drc.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/rpc/rpc-lib/src/rpc-drc.c b/rpc/rpc-lib/src/rpc-drc.c
index bc37324d391..5f54baf42e0 100644
--- a/rpc/rpc-lib/src/rpc-drc.c
+++ b/rpc/rpc-lib/src/rpc-drc.c
@@ -719,12 +719,12 @@ rpcsvc_drc_init (rpcsvc_t *svc, dict_t *options)
GF_ASSERT (options);
/* Toggle DRC on/off, when more drc types(persistent/cluster)
- are added, we shouldn't treat this as boolean */
- ret = dict_get_str_boolean (options, "nfs.drc", _gf_true);
+ * are added, we shouldn't treat this as boolean. */
+ ret = dict_get_str_boolean (options, "nfs.drc", _gf_false);
if (ret == -1) {
gf_log (GF_RPCSVC, GF_LOG_INFO,
"drc user options need second look");
- ret = _gf_true;
+ ret = _gf_false;
}
gf_log (GF_RPCSVC, GF_LOG_INFO, "DRC is turned %s", (ret?"ON":"OFF"));
@@ -870,12 +870,12 @@ rpcsvc_drc_reconfigure (rpcsvc_t *svc, dict_t *options)
* case 2: DRC is "OFF"
* ACTION: rpcsvc_drc_deinit()
*/
- ret = dict_get_str_boolean (options, "nfs.drc", _gf_true);
- if (ret < 0) {
- enable_drc = _gf_true;
- } else {
- enable_drc = ret;
- }
+ ret = dict_get_str_boolean (options, "nfs.drc", _gf_false);
+ if (ret < 0)
+ ret = _gf_false;
+
+ enable_drc = ret;
+ gf_log (GF_RPCSVC, GF_LOG_INFO, "DRC is turned %s", (ret?"ON":"OFF"));
/* case 1: DRC is "ON"*/
if (enable_drc) {
@@ -893,6 +893,5 @@ rpcsvc_drc_reconfigure (rpcsvc_t *svc, dict_t *options)
}
/* case 2: DRC is "OFF" */
- gf_log (GF_RPCSVC, GF_LOG_INFO, "DRC is manually turned OFF");
return rpcsvc_drc_deinit (svc);
}