summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c13
-rw-r--r--xlators/performance/io-cache/src/ioc-inode.c12
2 files changed, 13 insertions, 12 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 13811b628b1..60dda3e35a4 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -30,7 +30,7 @@
#include <assert.h>
#include <sys/time.h>
-extern int ioc_log2_page_size;
+int ioc_log2_page_size;
uint32_t
ioc_get_priority (ioc_table_t *table, const char *path);
@@ -38,6 +38,17 @@ ioc_get_priority (ioc_table_t *table, const char *path);
uint32_t
ioc_get_priority (ioc_table_t *table, const char *path);
+
+inline uint32_t
+ioc_hashfn (void *data, int len)
+{
+ off_t offset;
+
+ offset = *(off_t *) data;
+
+ return (offset >> ioc_log2_page_size);
+}
+
inline ioc_inode_t *
ioc_inode_reupdate (ioc_inode_t *ioc_inode)
{
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c
index 9ac5469f5e3..74c657fe7c3 100644
--- a/xlators/performance/io-cache/src/ioc-inode.c
+++ b/xlators/performance/io-cache/src/ioc-inode.c
@@ -24,17 +24,7 @@
#include "io-cache.h"
-int ioc_log2_page_size;
-
-inline uint32_t
-ioc_hashfn (void *data, int len)
-{
- off_t offset;
-
- offset = *(off_t *) data;
-
- return (offset >> ioc_log2_page_size);
-}
+extern int ioc_log2_page_size;
/*
* str_to_ptr - convert a string to pointer