diff options
author | Mohamed Ashiq <ashiq333@gmail.com> | 2015-05-19 15:46:01 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-07-14 02:35:13 -0700 |
commit | 2ab34a9c675a6167caed3326b6973854e8529843 (patch) | |
tree | eb72424b707ccf82866b9e1e6e55a576d02e5b65 /libglusterfs/src/syncop-utils.c | |
parent | 8e19c820dc1427d6bf552562c5df18a5884fd02b (diff) |
mem-pool,stack,store,syncop,timer/libglusterfs : Porting to a new logging framework
Backport of http://review.gluster.org/10827
Cherry picked from 2b9b3ef3b646989bbc0412dca187b3f5fcad3283
>Change-Id: Idd3dcaf7eeea5207b3a5210676ce3df64153197f
>BUG: 1194640
>Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com>
>Reviewed-on: http://review.gluster.org/10827
>Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Change-Id: Idd3dcaf7eeea5207b3a5210676ce3df64153197f
BUG: 1217722
Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com>
Reviewed-on: http://review.gluster.org/11478
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'libglusterfs/src/syncop-utils.c')
-rw-r--r-- | libglusterfs/src/syncop-utils.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libglusterfs/src/syncop-utils.c b/libglusterfs/src/syncop-utils.c index 349fa92d64f..8ab6befe652 100644 --- a/libglusterfs/src/syncop-utils.c +++ b/libglusterfs/src/syncop-utils.c @@ -15,6 +15,7 @@ #include "syncop.h" #include "common-utils.h" +#include "libglusterfs-messages.h" int syncop_dirfd (xlator_t *subvol, loc_t *loc, fd_t **fd, int pid) @@ -27,9 +28,9 @@ syncop_dirfd (xlator_t *subvol, loc_t *loc, fd_t **fd, int pid) dirfd = fd_create (loc->inode, pid); if (!dirfd) { - gf_log (subvol->name, GF_LOG_ERROR, - "fd_create of %s failed: %s", - uuid_utoa (loc->gfid), strerror(errno)); + gf_msg (subvol->name, GF_LOG_ERROR, errno, + LG_MSG_FD_CREATE_FAILED, "fd_create of %s", + uuid_utoa (loc->gfid)); ret = -errno; goto out; } @@ -49,18 +50,18 @@ syncop_dirfd (xlator_t *subvol, loc_t *loc, fd_t **fd, int pid) fd_unref (dirfd); dirfd = fd_anonymous (loc->inode); if (!dirfd) { - gf_log(subvol->name, GF_LOG_ERROR, - "fd_anonymous of %s failed: %s", - uuid_utoa (loc->gfid), strerror(errno)); + gf_msg (subvol->name, GF_LOG_ERROR, errno, + LG_MSG_FD_ANONYMOUS_FAILED, "fd_anonymous of " + "%s", uuid_utoa (loc->gfid)); ret = -errno; goto out; } ret = 0; #else /* GF_LINUX_HOST_OS */ fd_unref (dirfd); - gf_log (subvol->name, GF_LOG_ERROR, - "opendir of %s failed: %s", - uuid_utoa (loc->gfid), strerror(errno)); + gf_msg (subvol->name, GF_LOG_ERROR, errno, + LG_MSG_DIR_OP_FAILED, "opendir of %s", + uuid_utoa (loc->gfid)); goto out; #endif /* GF_LINUX_HOST_OS */ } @@ -304,7 +305,7 @@ syncop_is_subvol_local (xlator_t *this, loc_t *loc, gf_boolean_t *is_local) ret = glusterfs_is_local_pathinfo (pathinfo, is_local); - gf_log (this->name, GF_LOG_DEBUG, "subvol %s is %slocal", + gf_msg_debug (this->name, 0, "subvol %s is %slocal", this->name, is_local ? "" : "not "); out: |