summaryrefslogtreecommitdiffstats
path: root/xlators/performance/read-ahead/src/page.c
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/read-ahead/src/page.c
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/read-ahead/src/page.c')
-rw-r--r--xlators/performance/read-ahead/src/page.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c
index b1f69119fa3..216e327af74 100644
--- a/xlators/performance/read-ahead/src/page.c
+++ b/xlators/performance/read-ahead/src/page.c
@@ -14,6 +14,7 @@
#include "xlator.h"
#include "read-ahead.h"
#include <assert.h>
+#include "read-ahead-messages.h"
ra_page_t *
ra_page_get (ra_file_t *file, off_t offset)
@@ -150,7 +151,8 @@ ra_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
pending_offset = local->pending_offset;
if (file == NULL) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_msg (this->name, GF_LOG_WARNING, EBADF,
+ READ_AHEAD_MSG_FD_CONTEXT_NOT_SET,
"read-ahead context not set in fd (%p)", fd);
op_ret = -1;
op_errno = EBADF;
@@ -165,9 +167,10 @@ ra_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
page = ra_page_get (file, pending_offset);
if (!page) {
- gf_log (this->name, GF_LOG_TRACE,
- "wasted copy: %"PRId64"[+%"PRId64"] file=%p",
- pending_offset, file->page_size, file);
+ gf_msg_trace (this->name, 0,
+ "wasted copy: "
+ "%"PRId64"[+%"PRId64"] file=%p",
+ pending_offset, file->page_size, file);
goto unlock;
}