summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-16 06:43:12 +0000
committerAnand Avati <avati@gluster.com>2011-06-16 22:02:13 -0700
commit0101eb0b6444dc22860d8fdc82170aefa87ff0b3 (patch)
tree83031b823600d1f905d36a15d26b427585c00cc1
parent25e8700721a71128c9f6143dc2effcdbcee692fc (diff)
logging: fill proper domain names at places where it is missing
also changed some error messages where it was not explicit Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c25
-rw-r--r--libglusterfs/src/common-utils.c32
-rw-r--r--libglusterfs/src/compat.c10
-rw-r--r--libglusterfs/src/inode.c61
-rw-r--r--libglusterfs/src/iobuf.c26
-rw-r--r--libglusterfs/src/xlator.c6
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c2
-rw-r--r--rpc/rpc-lib/src/rpc-transport.c8
-rw-r--r--rpc/rpc-lib/src/rpcsvc-auth.c2
-rw-r--r--rpc/rpc-transport/socket/src/socket.c12
-rw-r--r--xlators/protocol/client/src/client-handshake.c25
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c80
12 files changed, 142 insertions, 147 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 01bd8a58ffa..c9ceb7c48b8 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -78,7 +78,7 @@ glusterfs_serialize_reply (rpcsvc_request_t *req, void *arg,
*/
iob = iobuf_get (req->svc->ctx->iobuf_pool);
if (!iob) {
- gf_log ("", GF_LOG_ERROR, "Failed to get iobuf");
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to get iobuf");
goto ret;
}
@@ -91,7 +91,7 @@ glusterfs_serialize_reply (rpcsvc_request_t *req, void *arg,
*/
retlen = sfunc (*outmsg, arg);
if (retlen == -1) {
- gf_log ("", GF_LOG_ERROR, "Failed to encode message");
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to encode message");
goto ret;
}
@@ -124,7 +124,7 @@ glusterfs_submit_reply (rpcsvc_request_t *req, void *arg,
if (!iobref) {
iobref = iobref_new ();
if (!iobref) {
- gf_log ("", GF_LOG_ERROR, "out of memory");
+ gf_log (THIS->name, GF_LOG_ERROR, "out of memory");
goto out;
}
@@ -133,7 +133,7 @@ glusterfs_submit_reply (rpcsvc_request_t *req, void *arg,
iob = glusterfs_serialize_reply (req, arg, sfunc, &rsp);
if (!iob) {
- gf_log ("", GF_LOG_ERROR, "Failed to serialize reply");
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to serialize reply");
goto out;
}
@@ -148,7 +148,7 @@ glusterfs_submit_reply (rpcsvc_request_t *req, void *arg,
*/
iobuf_unref (iob);
if (ret == -1) {
- gf_log ("", GF_LOG_ERROR, "Reply submission failed");
+ gf_log (THIS->name, GF_LOG_ERROR, "Reply submission failed");
goto out;
}
@@ -426,7 +426,7 @@ mgmt_submit_request (void *req, call_frame_t *frame,
if (req && sfunc) {
ret = sfunc (iov, req);
if (ret == -1) {
- gf_log ("", GF_LOG_WARNING, "failed to create XDR payload");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to create XDR payload");
goto out;
}
iov.iov_len = ret;
@@ -635,7 +635,8 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
size = rsp.op_ret;
if (size == oldvollen && (memcmp (oldvolfile, rsp.spec, size) == 0)) {
- gf_log ("", GF_LOG_INFO, "No change in volfile, continuing");
+ gf_log (frame->this->name, GF_LOG_INFO,
+ "No change in volfile, continuing");
goto out;
}
@@ -874,19 +875,19 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx)
rpc = rpc_clnt_new (options, THIS->ctx, THIS->name);
if (!rpc) {
ret = -1;
- gf_log ("", GF_LOG_WARNING, "failed to create rpc clnt");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to create rpc clnt");
goto out;
}
ret = rpc_clnt_register_notify (rpc, mgmt_rpc_notify, THIS);
if (ret) {
- gf_log ("", GF_LOG_WARNING, "failed to register notify function");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to register notify function");
goto out;
}
ret = rpcclnt_cbk_program_register (rpc, &mgmt_cbk_prog);
if (ret) {
- gf_log ("", GF_LOG_WARNING, "failed to register callback function");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to register callback function");
goto out;
}
@@ -1043,14 +1044,14 @@ mgmt_pmap_signout_cbk (struct rpc_req *req, struct iovec *iov, int count,
ctx = glusterfs_ctx_get ();
ret = xdr_to_pmap_signout_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log ("", GF_LOG_ERROR, "XDR decoding failed");
+ gf_log (THIS->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
}
if (-1 == rsp.op_ret) {
- gf_log ("", GF_LOG_ERROR,
+ gf_log (THIS->name, GF_LOG_ERROR,
"failed to register the port with glusterd");
goto out;
}
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 15371d1941f..96beee1794e 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -455,7 +455,7 @@ gf_strsplit (const char *str, const char *delim,
int j = 0;
if (str == NULL || delim == NULL || tokens == NULL || token_count == NULL) {
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
return -1;
}
@@ -526,7 +526,7 @@ gf_strstr (const char *str, const char *delim, const char *match)
tmp_str = strdup (str);
if (str == NULL || delim == NULL || match == NULL || tmp_str == NULL) {
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
ret = -1;
goto out;
}
@@ -557,7 +557,7 @@ gf_volume_name_validate (const char *volume_name)
const char *vname = NULL;
if (volume_name == NULL) {
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
return -1;
}
@@ -586,7 +586,7 @@ gf_string2time (const char *str, uint32_t *n)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -641,7 +641,7 @@ gf_string2percent (const char *str, uint32_t *n)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -694,7 +694,7 @@ _gf_string2long (const char *str, long *n, int base)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -734,7 +734,7 @@ _gf_string2ulong (const char *str, unsigned long *n, int base)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -789,7 +789,7 @@ _gf_string2uint (const char *str, unsigned int *n, int base)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -842,7 +842,7 @@ _gf_string2double (const char *str, double *n)
int old_errno = 0;
if (str == NULL || n == NULL) {
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -877,7 +877,7 @@ _gf_string2longlong (const char *str, long long *n, int base)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -917,7 +917,7 @@ _gf_string2ulonglong (const char *str, unsigned long long *n, int base)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -1308,7 +1308,7 @@ gf_string2bytesize (const char *str, uint64_t *n)
if (str == NULL || n == NULL)
{
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
errno = EINVAL;
return -1;
}
@@ -1419,7 +1419,7 @@ int
gf_string2boolean (const char *str, gf_boolean_t *b)
{
if (str == NULL) {
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
return -1;
}
@@ -1537,7 +1537,7 @@ get_checksum_for_path (char *path, uint32_t *checksum)
fd = open (path, O_RDWR);
if (fd == -1) {
- gf_log ("", GF_LOG_ERROR, "Unable to open %s, errno: %d",
+ gf_log (THIS->name, GF_LOG_ERROR, "Unable to open %s, errno: %d",
path, errno);
goto out;
}
@@ -1666,7 +1666,7 @@ valid_internet_address (char *address)
int length = 0;
if (address == NULL) {
- gf_log_callingfn ("", GF_LOG_WARNING, "arguement invalid");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "arguement invalid");
goto out;
}
@@ -1762,7 +1762,7 @@ gf_is_str_int (const char *value)
char *str = NULL;
char *fptr = NULL;
- GF_VALIDATE_OR_GOTO ("", value, out);
+ GF_VALIDATE_OR_GOTO (THIS->name, value, out);
str = gf_strdup (value);
if (!str)
diff --git a/libglusterfs/src/compat.c b/libglusterfs/src/compat.c
index 72bd0d3e2b5..2197272d97f 100644
--- a/libglusterfs/src/compat.c
+++ b/libglusterfs/src/compat.c
@@ -181,7 +181,7 @@ solaris_xattr_resolve_path (const char *real_path, char **path)
if (lstat (export_path, &statbuf)) {
ret = mkdir (export_path, 0777);
if (ret && (errno != EEXIST)) {
- gf_log ("", GF_LOG_DEBUG, "mkdir failed,"
+ gf_log (THIS->name, GF_LOG_DEBUG, "mkdir failed,"
" errno: %d", errno);
goto out;
}
@@ -195,7 +195,7 @@ solaris_xattr_resolve_path (const char *real_path, char **path)
if (ret) {
ret = mknod (xattr_path, S_IFREG|O_WRONLY, 0);
if (ret && (errno != EEXIST)) {
- gf_log ("", GF_LOG_WARNING,"Failed to create "
+ gf_log (THIS->name, GF_LOG_WARNING,"Failed to create "
"mapped file %s, error %d", xattr_path,
errno);
goto out;
@@ -490,13 +490,13 @@ int solaris_unlink (const char *path)
if (!ret && mapped_path) {
if (lstat(path, &stbuf)) {
- gf_log ("",GF_LOG_WARNING, "Stat failed on mapped"
+ gf_log (THIS->name, GF_LOG_WARNING, "Stat failed on mapped"
" file %s with error %d", mapped_path, errno);
goto out;
}
if (stbuf.st_nlink == 1) {
if(remove (mapped_path))
- gf_log ("", GF_LOG_WARNING, "Failed to remove mapped "
+ gf_log (THIS->name, GF_LOG_WARNING, "Failed to remove mapped "
"file %s. Errno %d", mapped_path, errno);
}
@@ -520,7 +520,7 @@ solaris_rename (const char *old_path, const char *new_path)
if (!ret && mapped_path) {
if (!remove (mapped_path))
- gf_log ("", GF_LOG_WARNING, "Failed to remove mapped "
+ gf_log (THIS->name, GF_LOG_WARNING, "Failed to remove mapped "
"file %s. Errno %d", mapped_path, errno);
GF_FREE (mapped_path);
}
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index bfcc9e2bc4f..90b62a2f497 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -94,7 +94,7 @@ __dentry_hash (dentry_t *dentry)
int hash = 0;
if (!dentry) {
- gf_log_callingfn ("", GF_LOG_WARNING, "dentry not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "dentry not found");
return;
}
@@ -111,7 +111,7 @@ static int
__is_dentry_hashed (dentry_t *dentry)
{
if (!dentry) {
- gf_log_callingfn ("", GF_LOG_WARNING, "dentry not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "dentry not found");
return 0;
}
@@ -123,7 +123,7 @@ static void
__dentry_unhash (dentry_t *dentry)
{
if (!dentry) {
- gf_log_callingfn ("", GF_LOG_WARNING, "dentry not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "dentry not found");
return;
}
@@ -137,7 +137,7 @@ __dentry_unset (dentry_t *dentry)
struct mem_pool *tmp_pool = NULL;
if (!dentry) {
- gf_log_callingfn ("", GF_LOG_WARNING, "dentry not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "dentry not found");
return;
}
@@ -171,19 +171,19 @@ __foreach_ancestor_dentry (dentry_t *dentry,
int ret = 0;
if (!dentry) {
- gf_log_callingfn ("", GF_LOG_WARNING, "dentry not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "dentry not found");
return 0;
}
ret = per_dentry_fn (dentry, data);
if (ret) {
- gf_log ("", GF_LOG_WARNING, "per dentry fn returned %d", ret);
+ gf_log (THIS->name, GF_LOG_WARNING, "per dentry fn returned %d", ret);
goto out;
}
parent = dentry->parent;
if (!parent) {
- gf_log ("", GF_LOG_WARNING, "parent not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "parent not found");
goto out;
}
@@ -240,7 +240,7 @@ static void
__inode_unhash (inode_t *inode)
{
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return;
}
@@ -252,7 +252,7 @@ static int
__is_inode_hashed (inode_t *inode)
{
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return 0;
}
@@ -267,7 +267,7 @@ __inode_hash (inode_t *inode)
int hash = 0;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return;
}
@@ -286,7 +286,7 @@ __dentry_search_for_inode (inode_t *inode, ino_t par, const char *name)
dentry_t *tmp = NULL;
if (!inode || !name) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode || name not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode || name not found");
return NULL;
}
@@ -310,12 +310,12 @@ __inode_destroy (inode_t *inode)
struct mem_pool *tmp_pool = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return;
}
if (!inode->_ctx) {
- gf_log ("", GF_LOG_WARNING, "_ctx not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "_ctx not found");
goto noctx;
}
@@ -360,7 +360,7 @@ __inode_passivate (inode_t *inode)
dentry_t *t = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return;
}
@@ -381,7 +381,7 @@ __inode_retire (inode_t *inode)
dentry_t *t = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return;
}
@@ -486,7 +486,7 @@ __dentry_create (inode_t *inode, inode_t *parent, const char *name)
dentry_t *newd = NULL;
if (!inode || !parent || !name) {
- gf_log_callingfn ("", GF_LOG_WARNING,
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING,
"inode || parent || name not found");
return NULL;
}
@@ -523,7 +523,7 @@ __inode_create (inode_table_t *table)
inode_t *newi = NULL;
if (!table) {
- gf_log_callingfn ("", GF_LOG_WARNING, "table not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "table not found");
return NULL;
}
@@ -567,7 +567,7 @@ inode_new (inode_table_t *table)
inode_t *inode = NULL;
if (!table) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return NULL;
}
@@ -643,7 +643,7 @@ inode_grep (inode_table_t *table, inode_t *parent, const char *name)
dentry_t *dentry = NULL;
if (!table || !parent || !name) {
- gf_log_callingfn ("", GF_LOG_WARNING,
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING,
"table || parent || name not found");
return NULL;
}
@@ -694,7 +694,7 @@ __inode_find (inode_table_t *table, uuid_t gfid)
int hash = 0;
if (!table) {
- gf_log_callingfn ("", GF_LOG_WARNING, "table not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "table not found");
goto out;
}
@@ -721,7 +721,7 @@ inode_find (inode_table_t *table, uuid_t gfid)
inode_t *inode = NULL;
if (!table) {
- gf_log_callingfn ("", GF_LOG_WARNING, "table not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "table not found");
return NULL;
}
@@ -805,7 +805,7 @@ inode_link (inode_t *inode, inode_t *parent, const char *name,
inode_t *linked_inode = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return NULL;
}
@@ -832,7 +832,7 @@ inode_lookup (inode_t *inode)
inode_table_t *table = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return -1;
}
@@ -854,7 +854,7 @@ inode_forget (inode_t *inode, uint64_t nlookup)
inode_table_t *table = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return -1;
}
@@ -894,7 +894,7 @@ inode_unlink (inode_t *inode, inode_t *parent, const char *name)
inode_table_t *table = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return;
}
@@ -916,7 +916,7 @@ inode_rename (inode_table_t *table, inode_t *srcdir, const char *srcname,
struct iatt *iatt)
{
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return -1;
}
@@ -970,7 +970,7 @@ inode_parent (inode_t *inode, ino_t par, const char *name)
dentry_t *dentry = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return NULL;
}
@@ -1007,7 +1007,7 @@ __inode_path (inode_t *inode, const char *name, char **bufp)
char *buf = NULL;
if (!inode) {
- gf_log_callingfn ("", GF_LOG_WARNING, "inode not found");
+ gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
return -1;
}
@@ -1516,10 +1516,7 @@ inode_dump (inode_t *inode, char *prefix)
INIT_LIST_HEAD (&fd_list);
ret = TRY_LOCK(&inode->lock);
-
if (ret != 0) {
- gf_log ("", GF_LOG_WARNING, "Unable to dump inode"
- " errno: %s", strerror (errno));
return;
}
@@ -1610,8 +1607,6 @@ inode_table_dump (inode_table_t *itable, char *prefix)
ret = pthread_mutex_trylock(&itable->lock);
if (ret != 0) {
- gf_log("", GF_LOG_WARNING, "Unable to dump inode table"
- " errno: %s", strerror (errno));
return;
}
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index c5cb9ec6607..8b6fddf5eb8 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -85,7 +85,7 @@ __iobuf_arena_destroy_iobufs (struct iobuf_arena *iobuf_arena)
iobuf_cnt = arena_size / page_size;
if (!iobuf_arena->iobufs) {
- gf_log_callingfn ("", GF_LOG_DEBUG, "iobufs not found");
+ gf_log_callingfn (THIS->name, GF_LOG_DEBUG, "iobufs not found");
return;
}
@@ -148,13 +148,13 @@ __iobuf_arena_alloc (struct iobuf_pool *iobuf_pool)
iobuf_arena->mem_base = mmap (NULL, arena_size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
if (iobuf_arena->mem_base == MAP_FAILED) {
- gf_log ("", GF_LOG_WARNING, "maping failed");
+ gf_log (THIS->name, GF_LOG_WARNING, "maping failed");
goto err;
}
__iobuf_arena_init_iobufs (iobuf_arena);
if (!iobuf_arena->iobufs) {
- gf_log ("", GF_LOG_DEBUG, "init failed");
+ gf_log (THIS->name, GF_LOG_DEBUG, "init failed");
goto err;
}
@@ -202,7 +202,7 @@ __iobuf_pool_add_arena (struct iobuf_pool *iobuf_pool)
iobuf_arena = __iobuf_arena_alloc (iobuf_pool);
if (!iobuf_arena) {
- gf_log ("", GF_LOG_WARNING, "arena not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "arena not found");
return NULL;
}
@@ -259,7 +259,7 @@ iobuf_pool_new (size_t arena_size, size_t page_size)
struct iobuf_pool *iobuf_pool = NULL;
if (arena_size < page_size) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (THIS->name, GF_LOG_WARNING,
"arena size (%zu) is less than page size(%zu)",
arena_size, page_size);
return NULL;
@@ -415,13 +415,13 @@ iobuf_get (struct iobuf_pool *iobuf_pool)
/* most eligible arena for picking an iobuf */
iobuf_arena = __iobuf_select_arena (iobuf_pool);
if (!iobuf_arena) {
- gf_log ("", GF_LOG_WARNING, "arena not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "arena not found");
goto unlock;
}
iobuf = __iobuf_get (iobuf_arena);
if (!iobuf) {
- gf_log ("", GF_LOG_WARNING, "iobuf not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "iobuf not found");
goto unlock;
}
@@ -475,13 +475,13 @@ iobuf_put (struct iobuf *iobuf)
iobuf_arena = iobuf->iobuf_arena;
if (!iobuf_arena) {
- gf_log ("", GF_LOG_WARNING, "arena not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "arena not found");
return;
}
iobuf_pool = iobuf_arena->iobuf_pool;
if (!iobuf_pool) {
- gf_log ("", GF_LOG_WARNING, "iobuf pool not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "iobuf pool not found");
return;
}
@@ -694,12 +694,12 @@ iobuf_size (struct iobuf *iobuf)
GF_VALIDATE_OR_GOTO ("iobuf", iobuf, out);
if (!iobuf->iobuf_arena) {
- gf_log ("", GF_LOG_WARNING, "arena not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "arena not found");
goto out;
}
if (!iobuf->iobuf_arena->iobuf_pool) {
- gf_log ("", GF_LOG_WARNING, "pool not found");
+ gf_log (THIS->name, GF_LOG_WARNING, "pool not found");
goto out;
}
@@ -743,8 +743,6 @@ iobuf_info_dump (struct iobuf *iobuf, const char *key_prefix)
ret = TRY_LOCK(&iobuf->lock);
if (ret) {
- gf_log("", GF_LOG_WARNING, "Unable to dump iobuf"
- " errno: %s", strerror (errno));
return;
}
memcpy(&my_iobuf, iobuf, sizeof(my_iobuf));
@@ -800,8 +798,6 @@ iobuf_stats_dump (struct iobuf_pool *iobuf_pool)
ret = pthread_mutex_trylock(&iobuf_pool->mutex);
if (ret) {
- gf_log("", GF_LOG_WARNING, "Unable to dump iobuf pool"
- " errno: %s", strerror (errno));
return;
}
gf_proc_dump_add_section("iobuf.global");
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 16020c0d277..f35c2518346 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -1501,11 +1501,11 @@ xlator_validate_rec (xlator_t *xlator, char **op_errstr)
}
if (xlator_dynload (xlator))
- gf_log ("", GF_LOG_DEBUG, "Did not load the symbols");
+ gf_log (xlator->name, GF_LOG_DEBUG, "Did not load the symbols");
if (xlator->validate_options) {
if (xlator->validate_options (xlator, op_errstr)) {
- gf_log ("", GF_LOG_INFO, "%s", *op_errstr);
+ gf_log (xlator->name, GF_LOG_INFO, "%s", *op_errstr);
goto out;
}
gf_log (xlator->name, GF_LOG_DEBUG, "Validated option");
@@ -1840,7 +1840,7 @@ glusterd_check_log_level (const char *value)
}
if (log_level == -1)
- gf_log ("", GF_LOG_ERROR, "Invalid log-level. possible values "
+ gf_log (THIS->name, GF_LOG_ERROR, "Invalid log-level. possible values "
"are DEBUG|WARNING|ERROR|CRITICAL|NONE|TRACE");
return log_level;
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index a4495248771..67f7bcfa1f5 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1050,7 +1050,7 @@ xdr_serialize_glusterfs_auth (char *dest, struct auth_glusterfs_parms *au)
XDR_ENCODE);
if (!xdr_auth_glusterfs_parms (&xdr, au)) {
- gf_log ("", GF_LOG_WARNING, "failed to encode auth glusterfs elements");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to encode auth glusterfs elements");
ret = -1;
goto ret;
}
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c
index 0ad579bc3d7..c9387e14508 100644
--- a/rpc/rpc-lib/src/rpc-transport.c
+++ b/rpc/rpc-lib/src/rpc-transport.c
@@ -989,27 +989,27 @@ rpc_transport_inet_options_build (dict_t **options, const char *hostname, int po
ret = dict_set_dynstr (dict, "remote-host", host);
if (ret) {
- gf_log ("", GF_LOG_WARNING, "failed to set remote-host with %s",
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to set remote-host with %s",
host);
goto out;
}
ret = dict_set_int32 (dict, "remote-port", port);
if (ret) {
- gf_log ("", GF_LOG_WARNING, "failed to set remote-port with %d",
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to set remote-port with %d",
port);
goto out;
}
ret = dict_set_str (dict, "transport.address-family", "inet");
if (ret) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (THIS->name, GF_LOG_WARNING,
"failed to set addr-family with inet");
goto out;
}
ret = dict_set_str (dict, "transport-type", "socket");
if (ret) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (THIS->name, GF_LOG_WARNING,
"failed to set trans-type with socket");
goto out;
}
diff --git a/rpc/rpc-lib/src/rpcsvc-auth.c b/rpc/rpc-lib/src/rpcsvc-auth.c
index 567a78a438c..fcf4617ca9b 100644
--- a/rpc/rpc-lib/src/rpcsvc-auth.c
+++ b/rpc/rpc-lib/src/rpcsvc-auth.c
@@ -348,7 +348,7 @@ rpcsvc_auth_unix_auxgids (rpcsvc_request_t *req, int *arrlen)
if ((req->cred.flavour != AUTH_UNIX) ||
(req->cred.flavour != AUTH_GLUSTERFS)) {
- gf_log ("", GF_LOG_DEBUG, "auth type not unix or glusterfs");
+ gf_log ("rpc", GF_LOG_DEBUG, "auth type not unix or glusterfs");
return NULL;
}
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 681064d7989..674259e5f18 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -375,7 +375,7 @@ __socket_nodelay (int fd)
ret = setsockopt (fd, IPPROTO_TCP, TCP_NODELAY,
&on, sizeof (on));
if (!ret)
- gf_log ("", GF_LOG_TRACE,
+ gf_log (THIS->name, GF_LOG_TRACE,
"NODELAY enabled for socket %d", fd);
return ret;
@@ -429,7 +429,7 @@ __socket_keepalive (int fd, int keepalive_intvl, int keepalive_idle)
#endif
done:
- gf_log ("", GF_LOG_TRACE, "Keep-alive enabled for socket %d, interval "
+ gf_log (THIS->name, GF_LOG_TRACE, "Keep-alive enabled for socket %d, interval "
"%d, idle: %d", fd, keepalive_intvl, keepalive_idle);
err:
@@ -1323,7 +1323,7 @@ __socket_read_reply (rpc_transport_t *this)
pthread_mutex_lock (&priv->lock);
if (ret == -1) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_WARNING,
"notify for event MAP_XID failed");
goto out;
}
@@ -1577,7 +1577,7 @@ __socket_proto_state_machine (rpc_transport_t *this,
priv->incoming.iobuf = NULL;
if (*pollin == NULL) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_WARNING,
"transport pollin allocation failed");
ret = -1;
goto out;
@@ -1900,7 +1900,7 @@ socket_server_event_handler (int fd, int idx, void *data,
}
pthread_mutex_unlock (&new_priv->lock);
if (ret == -1) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_WARNING,
"failed to register the socket with event");
goto unlock;
}
@@ -2092,7 +2092,7 @@ socket_connect (rpc_transport_t *this, int port)
priv->idx = event_register (ctx->event_pool, priv->sock,
socket_event_handler, this, 1, 1);
if (priv->idx == -1) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_WARNING,
"failed to register the event");
ret = -1;
}
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 9c90b6bce00..391d5516f4b 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -56,7 +56,7 @@ rpc_client_ping_timer_expired (void *data)
this = data;
if (!this || !this->private) {
- gf_log ("", GF_LOG_WARNING, "xlator initialization not done");
+ gf_log (THIS->name, GF_LOG_WARNING, "xlator initialization not done");
goto out;
}
@@ -140,7 +140,7 @@ client_start_ping (void *data)
this = data;
if (!this || !this->private) {
- gf_log ("", GF_LOG_WARNING, "xlator not initialized");
+ gf_log (THIS->name, GF_LOG_WARNING, "xlator not initialized");
goto fail;
}
@@ -218,7 +218,8 @@ client_start_ping (void *data)
return;
fail:
- gf_log ("", GF_LOG_ERROR, "failed to start ping timer");
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "failed to start ping timer");
if (frame) {
STACK_DESTROY (frame->root);
@@ -239,13 +240,13 @@ client_ping_cbk (struct rpc_req *req, struct iovec *iov, int count,
clnt_conf_t *conf = NULL;
if (!myframe) {
- gf_log ("", GF_LOG_WARNING, "frame with the request is NULL");
+ gf_log (THIS->name, GF_LOG_WARNING, "frame with the request is NULL");
goto out;
}
frame = myframe;
this = frame->this;
if (!this || !this->private) {
- gf_log ("", GF_LOG_WARNING, "xlator private is not set");
+ gf_log (THIS->name, GF_LOG_WARNING, "xlator private is not set");
goto out;
}
@@ -301,7 +302,7 @@ client3_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
frame = myframe;
if (!frame || !frame->this) {
- gf_log ("", GF_LOG_ERROR, "frame not found with the request, "
+ gf_log (THIS->name, GF_LOG_ERROR, "frame not found with the request, "
"returning EINVAL");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
@@ -639,7 +640,8 @@ protocol_client_reopendir (xlator_t *this, clnt_fd_ctx_t *fdctx)
return ret;
out:
- gf_log ("", GF_LOG_ERROR, "failed to send the re-opendir request");
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "failed to send the re-opendir request");
if (frame) {
frame->local = NULL;
@@ -719,7 +721,8 @@ protocol_client_reopen (xlator_t *this, clnt_fd_ctx_t *fdctx)
return ret;
out:
- gf_log ("", GF_LOG_ERROR, "failed to send the re-open request");
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "failed to send the re-open request");
if (frame) {
frame->local = NULL;
@@ -1054,7 +1057,7 @@ select_server_supported_programs (xlator_t *this, gf_prog_detail *prog)
int ret = -1;
if (!this || !prog) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (THIS->name, GF_LOG_WARNING,
"xlator not found OR RPC program not found");
goto out;
}
@@ -1093,7 +1096,7 @@ server_has_portmap (xlator_t *this, gf_prog_detail *prog)
int ret = -1;
if (!this || !prog) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (THIS->name, GF_LOG_WARNING,
"xlator not found OR RPC program not found");
goto out;
}
@@ -1128,7 +1131,7 @@ client_query_portmap_cbk (struct rpc_req *req, struct iovec *iov, int count, voi
frame = myframe;
if (!frame || !frame->this || !frame->this->private) {
- gf_log ("", GF_LOG_WARNING,
+ gf_log (THIS->name, GF_LOG_WARNING,
"frame not found with rpc request");
goto out;
}
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index e6d7e60c2b5..4790c790b5f 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -153,7 +153,7 @@ client3_1_symlink_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_symlink_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -212,7 +212,7 @@ client3_1_mknod_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_mknod_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -270,7 +270,7 @@ client3_1_mkdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_mkdir_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -327,7 +327,7 @@ client3_1_open_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_open_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -395,7 +395,7 @@ client3_1_stat_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_stat_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -437,7 +437,7 @@ client3_1_readlink_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_readlink_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -485,7 +485,7 @@ client3_1_unlink_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_unlink_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -530,7 +530,7 @@ client3_1_rmdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_rmdir_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -576,7 +576,7 @@ client3_1_truncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_truncate_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -621,7 +621,7 @@ client3_1_statfs_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_statfs_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -666,7 +666,7 @@ client3_1_writev_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_truncate_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -710,7 +710,7 @@ client3_1_flush_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -762,7 +762,7 @@ client3_1_fsync_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_truncate_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -806,7 +806,7 @@ client3_1_setxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -852,7 +852,7 @@ client3_1_getxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_getxattr_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
op_ret = -1;
op_errno = EINVAL;
goto out;
@@ -937,7 +937,7 @@ client3_1_fgetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_fgetxattr_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
op_ret = -1;
op_errno = EINVAL;
goto out;
@@ -1013,7 +1013,7 @@ client3_1_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1050,7 +1050,7 @@ client3_1_fsyncdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1087,7 +1087,7 @@ client3_1_access_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1127,7 +1127,7 @@ client3_1_ftruncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_ftruncate_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1171,7 +1171,7 @@ client3_1_fstat_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_fstat_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1213,7 +1213,7 @@ client3_1_inodelk_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1251,7 +1251,7 @@ client3_1_finodelk_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1289,7 +1289,7 @@ client3_1_entrylk_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1328,7 +1328,7 @@ client3_1_fentrylk_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1374,7 +1374,7 @@ client3_1_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_xattrop_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
op_ret = -1;
op_errno = EINVAL;
goto out;
@@ -1463,7 +1463,7 @@ client3_1_fxattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
if (ret < 0) {
op_ret = -1;
op_errno = EINVAL;
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
goto out;
}
op_errno = rsp.op_errno;
@@ -1537,7 +1537,7 @@ client3_1_fsetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_common_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1576,7 +1576,7 @@ client3_1_fsetattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
ret = xdr_to_fsetattr_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1623,7 +1623,7 @@ client3_1_setattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_setattr_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1679,7 +1679,7 @@ client3_1_create_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_create_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1751,7 +1751,7 @@ client3_1_rchecksum_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_rchecksum_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1800,7 +1800,7 @@ client3_1_lk_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_lk_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1864,7 +1864,7 @@ client3_1_readdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_readdir_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1920,7 +1920,7 @@ client3_1_readdirp_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_readdirp_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -1977,7 +1977,7 @@ client3_1_rename_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_rename_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -2036,7 +2036,7 @@ client3_1_link_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_link_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -2094,7 +2094,7 @@ client3_1_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_opendir_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -2171,7 +2171,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_lookup_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
op_errno = EINVAL;
goto out;
@@ -2281,7 +2281,7 @@ client3_1_readv_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_readv_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR, "error");
+ gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;