From 97b7150003deb44c0e7f458e795b9dfce6478f13 Mon Sep 17 00:00:00 2001 From: Humble Devassy Chirammal Date: Sat, 25 Apr 2015 12:44:15 +0530 Subject: libgfapi : port gfapi to new logging framework This also contains backport of http://review.gluster.org/10456: - Fix ENOKEY build failure on non Linux systems Cherry picked from commit 8986a47c54db4769feb4e6664532386f1cd0275d: > Change-Id: Iaa0a92f82b9a0a26eda1a8d72b3b66ce66fab443 > BUG: 1194640 > Signed-off-by: Humble Devassy Chirammal > Reviewed-on: http://review.gluster.org/9918 > Tested-by: Gluster Build System > Reviewed-by: jiffin tony Thottan > Reviewed-by: Raghavendra Talur > Reviewed-by: soumya k > Reviewed-by: Niels de Vos Signed-off-by: Humble Devassy Chirammal Change-Id: I320b4f1268d49a1a1086412ff2a9fb815bcf1cf4 BUG: 1217722 Change-Id: I320b4f1268d49a1a1086412ff2a9fb815bcf1cf4 Reviewed-on: http://review.gluster.org/10486 Tested-by: NetBSD Build System Reviewed-by: Kaleb KEITHLEY Tested-by: Gluster Build System Reviewed-by: jiffin tony Thottan --- api/src/glfs-handleops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'api/src/glfs-handleops.c') diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index 12ca94cb2dc..fd14b4cf70c 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -14,6 +14,7 @@ #include "syncop.h" #include "glfs.h" #include "glfs-handles.h" +#include "gfapi-messages.h" int glfs_listxattr_process (void *value, size_t size, dict_t *xattr); @@ -1212,7 +1213,8 @@ pub_glfs_h_create_from_handle (struct glfs *fs, unsigned char *handle, int len, ret = syncop_lookup (subvol, &loc, &iatt, 0, 0, 0); DECODE_SYNCOP_ERR (ret); if (ret) { - gf_log (subvol->name, GF_LOG_WARNING, + gf_msg (subvol->name, GF_LOG_WARNING, errno, + API_MSG_INODE_REFRESH_FAILED, "inode refresh of %s failed: %s", uuid_utoa (loc.gfid), strerror (errno)); goto out; @@ -1222,7 +1224,8 @@ pub_glfs_h_create_from_handle (struct glfs *fs, unsigned char *handle, int len, if (newinode) inode_lookup (newinode); else { - gf_log (subvol->name, GF_LOG_WARNING, + gf_msg (subvol->name, GF_LOG_WARNING, EINVAL, + API_MSG_INVALID_ENTRY, "inode linking of %s failed: %s", uuid_utoa (loc.gfid), strerror (errno)); errno = EINVAL; -- cgit