summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r--libglusterfs/src/inode.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index d4eade8ba88..373ba9beb39 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -1238,6 +1238,27 @@ inode_path (inode_t *inode, const char *name, char **bufp)
return ret;
}
+void
+__inode_table_set_lru_limit (inode_table_t *table, uint32_t lru_limit)
+{
+ table->lru_limit = lru_limit;
+ return;
+}
+
+
+void
+inode_table_set_lru_limit (inode_table_t *table, uint32_t lru_limit)
+{
+ pthread_mutex_lock (&table->lock);
+ {
+ __inode_table_set_lru_limit (table, lru_limit);
+ }
+ pthread_mutex_unlock (&table->lock);
+
+ inode_table_prune (table);
+
+ return;
+}
static int
inode_table_prune (inode_table_t *table)