summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src/io-cache.h
diff options
context:
space:
mode:
authorarao <arao@redhat.com>2015-06-22 11:10:05 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-27 02:29:27 -0700
commit3741804bec65a33d400af38dcc80700c8a668b81 (patch)
treea10008485e263087a52764d2d1ae413bf58c9240 /xlators/performance/io-cache/src/io-cache.h
parent911e9228f31e89fe5df6e2282ce449b2a94c42b1 (diff)
Logging: Porting the performance translator
logs to new logging framework. Change-Id: Ie6aaf8d30bd4457bb73c48e23e6b1dea27598644 BUG: 1194640 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9822 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/performance/io-cache/src/io-cache.h')
-rw-r--r--xlators/performance/io-cache/src/io-cache.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h
index c677bcd93f4..d7c823fe962 100644
--- a/xlators/performance/io-cache/src/io-cache.h
+++ b/xlators/performance/io-cache/src/io-cache.h
@@ -24,6 +24,7 @@
#include "hashfn.h"
#include <sys/time.h>
#include <fnmatch.h>
+#include "io-cache-messages.h"
#define IOC_PAGE_SIZE (1024 * 128) /* 128KB */
#define IOC_CACHE_SIZE (32 * 1024 * 1024)
@@ -219,64 +220,64 @@ 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_TRACE, \
- "locked inode(%p)", ioc_inode); \
+ gf_msg_trace (ioc_inode->table->xl->name, 0, \
+ "locked inode(%p)", ioc_inode); \
pthread_mutex_lock (&ioc_inode->inode_lock); \
} while (0)
#define ioc_inode_unlock(ioc_inode) \
do { \
- gf_log (ioc_inode->table->xl->name, GF_LOG_TRACE, \
- "unlocked inode(%p)", ioc_inode); \
+ gf_msg_trace (ioc_inode->table->xl->name, 0, \
+ "unlocked inode(%p)", ioc_inode); \
pthread_mutex_unlock (&ioc_inode->inode_lock); \
} while (0)
-#define ioc_table_lock(table) \
- do { \
- gf_log (table->xl->name, GF_LOG_TRACE, \
- "locked table(%p)", table); \
- pthread_mutex_lock (&table->table_lock); \
+#define ioc_table_lock(table) \
+ do { \
+ gf_msg_trace (table->xl->name, 0, \
+ "locked table(%p)", table); \
+ pthread_mutex_lock (&table->table_lock); \
} while (0)
-#define ioc_table_unlock(table) \
- do { \
- gf_log (table->xl->name, GF_LOG_TRACE, \
- "unlocked table(%p)", table); \
- pthread_mutex_unlock (&table->table_lock); \
+#define ioc_table_unlock(table) \
+ do { \
+ gf_msg_trace (table->xl->name, 0, \
+ "unlocked table(%p)", table); \
+ pthread_mutex_unlock (&table->table_lock); \
} while (0)
#define ioc_local_lock(local) \
do { \
- gf_log (local->inode->table->xl->name, GF_LOG_TRACE, \
- "locked local(%p)", local); \
+ gf_msg_trace (local->inode->table->xl->name, 0, \
+ "locked local(%p)", local); \
pthread_mutex_lock (&local->local_lock); \
} while (0)
#define ioc_local_unlock(local) \
do { \
- gf_log (local->inode->table->xl->name, GF_LOG_TRACE, \
- "unlocked local(%p)", local); \
+ gf_msg_trace (local->inode->table->xl->name, 0, \
+ "unlocked local(%p)", local); \
pthread_mutex_unlock (&local->local_lock); \
} while (0)
#define ioc_page_lock(page) \
do { \
- gf_log (page->inode->table->xl->name, GF_LOG_TRACE, \
- "locked page(%p)", page); \
+ gf_msg_trace (page->inode->table->xl->name, 0, \
+ "locked page(%p)", page); \
pthread_mutex_lock (&page->page_lock); \
} while (0)
#define ioc_page_unlock(page) \
do { \
- gf_log (page->inode->table->xl->name, GF_LOG_TRACE, \
- "unlocked page(%p)", page); \
+ gf_msg_trace (page->inode->table->xl->name, 0, \
+ "unlocked page(%p)", page); \
pthread_mutex_unlock (&page->page_lock); \
} while (0)