summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src/ioc-inode.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2009-11-26 06:37:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-26 04:32:25 -0800
commit63f963700f0c89292092047ec2423e8d8ab1f955 (patch)
treefd3ab478b460385a9d25172c0b6a7e29807cdb4d /xlators/performance/io-cache/src/ioc-inode.c
parenta928aa5e0d65b9439b8a10eb9dede954220ba9f3 (diff)
Changed rbthash_table_init() to take a mem-pool argument.
Changes in libglusterfs/rbthash: rbthash_table_init() now takes a mem-pool argument. The mem-pool argument would be mutually exclusive to expected_entries. If expected_entries is provided, mem-pool would be ignored and vice-versa. Changes in io-cache: 1) Moved rbthash creation to readv. 2) rbthash makes use of 1 rbt instead of 4096 3) A global mem-pool is being used in place of a mem-pool per rbt. Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 335 (Io-cache optimization) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335
Diffstat (limited to 'xlators/performance/io-cache/src/ioc-inode.c')
-rw-r--r--xlators/performance/io-cache/src/ioc-inode.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c
index 11da863123f..9ac5469f5e3 100644
--- a/xlators/performance/io-cache/src/ioc-inode.c
+++ b/xlators/performance/io-cache/src/ioc-inode.c
@@ -177,16 +177,6 @@ ioc_inode_update (ioc_table_t *table, inode_t *inode, uint32_t weight)
no_of_pages = (table->cache_size / table->page_size)
+ ((table->cache_size % table->page_size) ? 1 : 0);
- /* initialize the list for pages */
- ioc_inode->cache.page_table = rbthash_table_init (IOC_PAGE_TABLE_BUCKET_COUNT,
- ioc_hashfn, NULL,
- no_of_pages);
- if (ioc_inode->cache.page_table == NULL) {
- FREE (ioc_inode);
- ioc_inode = NULL;
- goto out;
- }
-
INIT_LIST_HEAD (&ioc_inode->cache.page_lru);
ioc_table_lock (table);