summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-09-16 05:43:01 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-16 07:11:12 -0700
commit34a7a97b3be80fa8af7d285211ab575a4c00ea79 (patch)
tree3a15428b527fa41e542bb2adeeecc0562d166018 /xlators/performance/io-cache
parent47b340a0d499d5f9364f763e5794a433be609e17 (diff)
io-cache: fix table->max_pri to 1 as the lowest priority
patch http://patches.gluster.com/patch/1319/ breaks when no priority is mentioned in the config. the patch makes ioc_get_priority() return 1 as the value when no priority is given, but ioc_get_priority_list() was still returning 0 as the max_pri (maximum priority) which would result in lru list heads not getting initialized Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 261 (support for disabling caching of certain files) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=261
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index f73cdb111..49a1ce823 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -1338,7 +1338,7 @@ ioc_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
int32_t
ioc_get_priority_list (const char *opt_str, struct list_head *first)
{
- int32_t max_pri = 0;
+ int32_t max_pri = 1;
char *tmp_str = NULL;
char *tmp_str1 = NULL;
char *tmp_str2 = NULL;
@@ -1498,6 +1498,7 @@ init (xlator_t *this)
}
INIT_LIST_HEAD (&table->priority_list);
+ table->max_pri = 1;
if (dict_get (options, "priority")) {
char *option_list = data_to_str (dict_get (options,
"priority"));