summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2015-08-12 14:46:29 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-08-31 22:30:50 -0700
commit93519aed0f32570bd6fb8e0113f76a75545ab804 (patch)
treea8ab17fbd3c301f073c1dd9bb2ea4b1c1b167471 /api
parent8abb8f625b038dc676709f500255f051b008ea49 (diff)
libgfapi : port missing gf_log's to gf_msg
Backport of http://review.gluster.org/#/c/11891/ Cherry-picked from commit 1e0644031c7ac0fa28f0912e951a9238f7bbe8ab > Change-Id: I0c5320c09b4a5ff1e9df61a86ac7bd47c1bb1bbb > BUG: 1252807 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11891 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra Talur <rtalur@redhat.com> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I0c5320c09b4a5ff1e9df61a86ac7bd47c1bb1bbb BUG: 1258406 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12063 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>
Diffstat (limited to 'api')
-rw-r--r--api/src/gfapi-messages.h4
-rw-r--r--api/src/glfs-fops.c12
-rw-r--r--api/src/glfs-handleops.c8
3 files changed, 13 insertions, 11 deletions
diff --git a/api/src/gfapi-messages.h b/api/src/gfapi-messages.h
index 2c59af24113..c54d821efc7 100644
--- a/api/src/gfapi-messages.h
+++ b/api/src/gfapi-messages.h
@@ -45,7 +45,7 @@
*/
#define GLFS_GFAPI_BASE GLFS_MSGID_COMP_API
-#define GLFS_NUM_MESSAGES 45
+#define GLFS_NUM_MESSAGES 47
#define GLFS_MSGID_END (GLFS_GFAPI_BASE + GLFS_NUM_MESSAGESi + 1)
/* Messages with message IDs */
#define glfs_msg_start_x GLFS_GFAPI_BASE, "Invalid: Start of messages"
@@ -97,6 +97,8 @@
#define API_MSG_VOLFILE_CONNECTING (GLFS_GFAPI_BASE + 44)
#define API_MSG_NEW_GRAPH (GLFS_GFAPI_BASE + 45)
#define API_MSG_ALLOC_FAILED (GLFS_GFAPI_BASE + 46)
+#define API_MSG_CREATE_HANDLE_FAILED (GLFS_GFAPI_BASE + 47)
+
/*------------*/
#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index eaf18051f9c..f17d7212d39 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -3804,8 +3804,8 @@ priv_glfs_process_upcall_event (struct glfs *fs, void *data)
struct gf_upcall *upcall_data = NULL;
struct glfs_object *object = NULL;
- gf_log (THIS->name, GF_LOG_DEBUG,
- "Upcall gfapi callback is called");
+ gf_msg_debug (THIS->name, 0,
+ "Upcall gfapi callback is called");
if (!fs || !data)
goto out;
@@ -3830,15 +3830,15 @@ priv_glfs_process_upcall_event (struct glfs *fs, void *data)
upcall_data = (struct gf_upcall *)data;
- gf_log (THIS->name, GF_LOG_TRACE, "Upcall gfapi gfid = %s"
- "ret = %d", (char *)(upcall_data->gfid), ret);
+ gf_msg_trace (THIS->name, 0, "Upcall gfapi gfid = %s"
+ "ret = %d", (char *)(upcall_data->gfid), ret);
u_list = GF_CALLOC (1, sizeof(*u_list),
glfs_mt_upcall_entry_t);
if (!u_list) {
- gf_log (THIS->name, GF_LOG_ERROR, "Upcall entry allocation"
- "failed.");
+ gf_msg (THIS->name, GF_LOG_ERROR, ENOMEM, API_MSG_ALLOC_FAILED,
+ "Upcall entry allocation failed.");
goto out;
}
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index 79085ff33a1..0f201a2b99d 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -1938,10 +1938,10 @@ pub_glfs_h_poll_upcall (struct glfs *fs, struct callback_arg *up_arg)
*
* Applications will ignore this notification
* as up_arg->object will be NULL */
- gf_log (subvol->name, GF_LOG_WARNING,
- "handle creation of %s failed: %s",
- uuid_utoa (upcall_data->gfid),
- strerror (errno));
+ gf_msg (subvol->name, GF_LOG_WARNING, errno,
+ API_MSG_CREATE_HANDLE_FAILED,
+ "handle creation of %s failed",
+ uuid_utoa (upcall_data->gfid));
reason = GFAPI_CBK_EVENT_NULL;
break;