summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2014-06-03 00:28:08 +0530
committerRaghavendra G <rgowdapp@redhat.com>2014-06-13 01:49:10 -0700
commit6ba178fd9ebf9fc98415c30bcd338a68ee5eb601 (patch)
treeb050a02506263651ba24603f25672bfd13d1f0b3 /xlators
parent4d656f9008747172db52f6d532b610c487528bfb (diff)
protocol/server: reflect lru limit in inode table also
Upon reconfigure, when lru limit of the inode table is changed, the new value was just saved in the private structure of the protocol/server xlator and the inode table used to have the older values still. A brick start was required for the changes to get reflected. To handle it, traverse through the xlator tree and check whether a xlator is a bound_xl or not (if it is a bound_xl it would have its itable pointer set). If a xlator is a bound_xl, then get the inode table of that bound_xl and set its lru limit to new value given via cli. Also prune the inode table so that extra inodes are purged from the inode table. Change-Id: I6909be028c116adaa1d1a5108470015b5fc6f09d BUG: 1103756 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/7957 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/server/src/server.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 04faee290ea..60092a557de 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -677,6 +677,8 @@ reconfigure (xlator_t *this, dict_t *options)
data_t *data;
int ret = 0;
char *statedump_path = NULL;
+ xlator_t *xl = NULL;
+
conf = this->private;
if (!conf) {
@@ -687,6 +689,14 @@ reconfigure (xlator_t *this, dict_t *options)
conf->inode_lru_limit = inode_lru_limit;
gf_log (this->name, GF_LOG_TRACE, "Reconfigured inode-lru-limit"
" to %d", conf->inode_lru_limit);
+
+ /* traverse through the xlator graph. For each xlator in the
+ graph check whether it is a bound_xl or not (bound_xl means
+ the xlator will have its itable pointer set). If so, then
+ set the lru limit for the itable.
+ */
+ xlator_foreach (this, xlator_set_inode_lru_limit,
+ &inode_lru_limit);
}
data = dict_get (options, "trace");