summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-05-05 19:19:30 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-05-05 20:10:38 +0530
commitf62628af61f5ef72c6af2b807c1bba71f291a366 (patch)
tree81c501b4710cfe3f9a4c9330828f563d05a11c46
parente9800f8915257f8e3fc94dea8257e20a5561dfd7 (diff)
io-cache logging level fixes
-rw-r--r--xlators/performance/io-cache/src/io-cache.c19
-rw-r--r--xlators/performance/io-cache/src/io-cache.h16
-rw-r--r--xlators/performance/io-cache/src/ioc-inode.c4
-rw-r--r--xlators/performance/io-cache/src/page.c26
4 files changed, 32 insertions, 33 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 8b36d2af7ab..8f018fc75bf 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -303,7 +303,7 @@ ioc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
tmp += page->vector[i].iov_len;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"serving file %s from cache",
local->file_loc.path);
@@ -897,7 +897,7 @@ ioc_dispatch_requests (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
/* page found in cache */
if (!might_need_validate) {
/* fresh enough */
- gf_log (frame->this->name, GF_LOG_DEBUG,
+ gf_log (frame->this->name, GF_LOG_TRACE,
"cache hit for trav_offset=%"PRId64""
"/local_offset=%"PRId64"",
trav_offset, local_offset);
@@ -926,7 +926,7 @@ ioc_dispatch_requests (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
if (need_validate) {
need_validate = 0;
- gf_log (frame->this->name, GF_LOG_DEBUG,
+ gf_log (frame->this->name, GF_LOG_TRACE,
"sending validate request for "
"inode(%"PRId64") at offset=%"PRId64"",
fd->inode->ino, trav_offset);
@@ -996,7 +996,7 @@ ioc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
local->size = size;
local->inode = ioc_inode;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"NEW REQ (%p) offset = %"PRId64" && size = %"GF_PRI_SIZET"",
frame, offset, size);
@@ -1214,9 +1214,8 @@ ioc_get_priority_list (const char *opt_str, struct list_head *first)
priority = strtok_r (NULL, ":", &tmp_str1);
if (!priority)
return -1;
- gf_log ("io-cache",
- GF_LOG_DEBUG,
- "ioc priority : pattern %s : priority %s",
+ gf_log ("io-cache", GF_LOG_TRACE,
+ "ioc priority : pattern %s : priority %s",
pattern,
priority);
curr->pattern = strdup (pattern);
@@ -1276,7 +1275,7 @@ init (xlator_t *this)
return -1;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"using cache-size %"PRIu64"", table->cache_size);
}
@@ -1286,7 +1285,7 @@ init (xlator_t *this)
table->cache_timeout =
data_to_uint32 (dict_get (options,
"cache-timeout"));
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"Using %d seconds to revalidate cache",
table->cache_timeout);
}
@@ -1295,7 +1294,7 @@ init (xlator_t *this)
if (dict_get (options, "priority")) {
char *option_list = data_to_str (dict_get (options,
"priority"));
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"option path %s", option_list);
/* parse the list of pattern:priority */
table->max_pri = ioc_get_priority_list (option_list,
diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h
index 954b3fec4b9..5d0590d3311 100644
--- a/xlators/performance/io-cache/src/io-cache.h
+++ b/xlators/performance/io-cache/src/io-cache.h
@@ -221,7 +221,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_inode_lock(ioc_inode) \
do { \
- gf_log (ioc_inode->table->xl->name, GF_LOG_DEBUG, \
+ gf_log (ioc_inode->table->xl->name, GF_LOG_TRACE, \
"locked inode(%p)", ioc_inode); \
pthread_mutex_lock (&ioc_inode->inode_lock); \
} while (0)
@@ -229,7 +229,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_inode_unlock(ioc_inode) \
do { \
- gf_log (ioc_inode->table->xl->name, GF_LOG_DEBUG, \
+ gf_log (ioc_inode->table->xl->name, GF_LOG_TRACE, \
"unlocked inode(%p)", ioc_inode); \
pthread_mutex_unlock (&ioc_inode->inode_lock); \
} while (0)
@@ -237,7 +237,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_table_lock(table) \
do { \
- gf_log (table->xl->name, GF_LOG_DEBUG, \
+ gf_log (table->xl->name, GF_LOG_TRACE, \
"locked table(%p)", table); \
pthread_mutex_lock (&table->table_lock); \
} while (0)
@@ -245,7 +245,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_table_unlock(table) \
do { \
- gf_log (table->xl->name, GF_LOG_DEBUG, \
+ gf_log (table->xl->name, GF_LOG_TRACE, \
"unlocked table(%p)", table); \
pthread_mutex_unlock (&table->table_lock); \
} while (0)
@@ -253,7 +253,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_local_lock(local) \
do { \
- gf_log (local->inode->table->xl->name, GF_LOG_DEBUG, \
+ gf_log (local->inode->table->xl->name, GF_LOG_TRACE, \
"locked local(%p)", local); \
pthread_mutex_lock (&local->local_lock); \
} while (0)
@@ -261,7 +261,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_local_unlock(local) \
do { \
- gf_log (local->inode->table->xl->name, GF_LOG_DEBUG, \
+ gf_log (local->inode->table->xl->name, GF_LOG_TRACE, \
"unlocked local(%p)", local); \
pthread_mutex_unlock (&local->local_lock); \
} while (0)
@@ -269,7 +269,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_page_lock(page) \
do { \
- gf_log (page->inode->table->xl->name, GF_LOG_DEBUG, \
+ gf_log (page->inode->table->xl->name, GF_LOG_TRACE, \
"locked page(%p)", page); \
pthread_mutex_lock (&page->page_lock); \
} while (0)
@@ -277,7 +277,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
#define ioc_page_unlock(page) \
do { \
- gf_log (page->inode->table->xl->name, GF_LOG_DEBUG, \
+ gf_log (page->inode->table->xl->name, GF_LOG_TRACE, \
"unlocked page(%p)", page); \
pthread_mutex_unlock (&page->page_lock); \
} while (0)
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c
index c984ce1337f..60207720278 100644
--- a/xlators/performance/io-cache/src/ioc-inode.c
+++ b/xlators/performance/io-cache/src/ioc-inode.c
@@ -109,7 +109,7 @@ ioc_inode_wakeup (call_frame_t *frame, ioc_inode_t *ioc_inode,
need_fault = 1;
} else {
gf_log (frame->this->name,
- GF_LOG_DEBUG,
+ GF_LOG_TRACE,
"validate frame(%p) is waiting"
"for in-transit page = %p",
frame, waiter_page);
@@ -165,7 +165,7 @@ ioc_inode_update (ioc_table_t *table, inode_t *inode, uint32_t weight)
list_add_tail (&ioc_inode->inode_lru, &table->inode_lru[weight]);
gf_log (table->xl->name,
- GF_LOG_DEBUG,
+ GF_LOG_TRACE,
"adding to inode_lru[%d]", weight);
ioc_table_unlock (table);
diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c
index 87a6e1a85b5..be880344441 100644
--- a/xlators/performance/io-cache/src/page.c
+++ b/xlators/performance/io-cache/src/page.c
@@ -86,7 +86,7 @@ ioc_page_destroy (ioc_page_t *page)
list_del (&page->pages);
list_del (&page->page_lru);
- gf_log (page->inode->table->xl->name, GF_LOG_DEBUG,
+ gf_log (page->inode->table->xl->name, GF_LOG_TRACE,
"destroying page = %p, offset = %"PRId64" "
"&& inode = %p",
page, page->offset, page->inode);
@@ -153,7 +153,7 @@ ioc_prune (ioc_table_t *table)
table->cache_used -= ret;
gf_log (table->xl->name,
- GF_LOG_DEBUG,
+ GF_LOG_TRACE,
"index = %d && table->cache_"
"used = %"PRIu64" && table->"
"cache_size = %"PRIu64,
@@ -220,7 +220,7 @@ ioc_page_create (ioc_inode_t *ioc_inode, off_t offset)
page = newpage;
- gf_log ("io-cache", GF_LOG_DEBUG,
+ gf_log ("io-cache", GF_LOG_TRACE,
"returning new page %p", page);
return page;
}
@@ -244,7 +244,7 @@ ioc_wait_on_page (ioc_page_t *page, call_frame_t *frame, off_t offset,
waitq = CALLOC (1, sizeof (*waitq));
ERR_ABORT (waitq);
- gf_log (frame->this->name, GF_LOG_DEBUG,
+ gf_log (frame->this->name, GF_LOG_TRACE,
"frame(%p) waiting on page = %p, offset=%"PRId64", "
"size=%"GF_PRI_SIZET"",
frame, page, offset, size);
@@ -348,7 +348,7 @@ ioc_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1 ||
(op_ret >= 0 &&
!ioc_cache_still_valid(ioc_inode, stbuf))) {
- gf_log (ioc_inode->table->xl->name, GF_LOG_DEBUG,
+ gf_log (ioc_inode->table->xl->name, GF_LOG_TRACE,
"cache for inode(%p) is invalid. flushing "
"all pages", ioc_inode);
destroy_size = __ioc_inode_flush (ioc_inode);
@@ -366,7 +366,7 @@ ioc_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
waitq = ioc_page_error (page, op_ret,
op_errno);
} else {
- gf_log (ioc_inode->table->xl->name, GF_LOG_DEBUG,
+ gf_log (ioc_inode->table->xl->name, GF_LOG_TRACE,
"op_ret = %d", op_ret);
page = ioc_page_get (ioc_inode, offset);
if (!page) {
@@ -441,7 +441,7 @@ ioc_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ioc_prune (ioc_inode->table);
}
- gf_log (this->name, GF_LOG_DEBUG, "fault frame %p returned", frame);
+ gf_log (this->name, GF_LOG_TRACE, "fault frame %p returned", frame);
pthread_mutex_destroy (&local->local_lock);
fd_unref (local->fd);
@@ -485,7 +485,7 @@ ioc_page_fault (ioc_inode_t *ioc_inode, call_frame_t *frame, fd_t *fd,
fault_local->pending_size = table->page_size;
fault_local->inode = ioc_inode;
- gf_log (frame->this->name, GF_LOG_DEBUG,
+ gf_log (frame->this->name, GF_LOG_TRACE,
"stack winding page fault for offset = %"PRId64" with "
"frame %p", offset, fault_frame);
@@ -511,7 +511,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
local = frame->local;
ioc_inode = page->inode;
- gf_log (frame->this->name, GF_LOG_DEBUG,
+ gf_log (frame->this->name, GF_LOG_TRACE,
"frame (%p) offset = %"PRId64" && size = %"GF_PRI_SIZET" "
"&& page->size = %"GF_PRI_SIZET" && wait_count = %d",
frame, offset, size, page->size, local->wait_count);
@@ -542,7 +542,7 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset,
copy_size = src_offset = 0;
}
- gf_log (page->inode->table->xl->name, GF_LOG_DEBUG,
+ gf_log (page->inode->table->xl->name, GF_LOG_TRACE,
"copy_size = %"GF_PRI_SIZET" && src_offset = "
"%"PRId64" && dst_offset = %"PRId64"",
copy_size, src_offset, dst_offset);
@@ -629,7 +629,7 @@ ioc_frame_unwind (call_frame_t *frame)
frame->local = NULL;
if (list_empty (&local->fill_list)) {
- gf_log (frame->this->name, GF_LOG_DEBUG,
+ gf_log (frame->this->name, GF_LOG_TRACE,
"frame(%p) has 0 entries in local->fill_list "
"(offset = %"PRId64" && size = %"GF_PRI_SIZET")",
frame, local->offset, local->size);
@@ -658,7 +658,7 @@ ioc_frame_unwind (call_frame_t *frame)
}
op_ret = iov_length (vector, count);
- gf_log (frame->this->name, GF_LOG_DEBUG,
+ gf_log (frame->this->name, GF_LOG_TRACE,
"frame(%p) unwinding with op_ret=%d", frame, op_ret);
// ioc_local_unlock (local);
@@ -721,7 +721,7 @@ ioc_page_wakeup (ioc_page_t *page)
trav = waitq;
page->ready = 1;
- gf_log (page->inode->table->xl->name, GF_LOG_DEBUG,
+ gf_log (page->inode->table->xl->name, GF_LOG_TRACE,
"page is %p && waitq = %p", page, waitq);
for (trav = waitq; trav; trav = trav->next) {