diff options
Diffstat (limited to 'xlators/protocol/server')
| -rw-r--r-- | xlators/protocol/server/src/server-messages.h | 39 | ||||
| -rw-r--r-- | xlators/protocol/server/src/server-resolve.c | 7 | ||||
| -rw-r--r-- | xlators/protocol/server/src/server-rpc-fops.c | 8 | ||||
| -rw-r--r-- | xlators/protocol/server/src/server.c | 26 | 
4 files changed, 63 insertions, 17 deletions
diff --git a/xlators/protocol/server/src/server-messages.h b/xlators/protocol/server/src/server-messages.h index 83c9a9039b9..700af57143a 100644 --- a/xlators/protocol/server/src/server-messages.h +++ b/xlators/protocol/server/src/server-messages.h @@ -40,7 +40,7 @@   */  #define GLFS_PS_BASE                GLFS_MSGID_COMP_PS -#define GLFS_NUM_MESSAGES           83 +#define GLFS_NUM_MESSAGES           88  #define GLFS_MSGID_END              (GLFS_PS_BASE + GLFS_NUM_MESSAGES + 1)  /* Messages with message IDs */  #define glfs_msg_start_x GLFS_PS_BASE, "Invalid: Start of messages" @@ -793,6 +793,43 @@   *   */ +#define PS_MSG_ENCODE_MSG_FAILED                (GLFS_PS_BASE + 84) + +/*! + * @messageid + * @diagnosis + * @recommendedaction + * + */ + +#define PS_MSG_REPLY_SUBMIT_FAILED              (GLFS_PS_BASE + 85) + +/*! + * @messageid + * @diagnosis + * @recommendedaction + * + */ + +#define PS_MSG_RPC_NOTIFY_ERROR                  (GLFS_PS_BASE + 86) + +/*! + * @messageid + * @diagnosis + * @recommendedaction + * + */ + +#define PS_MSG_SERVER_EVENT_UPCALL_FAILED       (GLFS_PS_BASE + 87) + +/*! + * @messageid + * @diagnosis + * @recommendedaction + * + */ + +#define PS_MSG_SERVER_IPC_INFO                  (GLFS_PS_BASE + 88)  /*------------*/  #define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages" diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index a7071daaf6a..0a23a299318 100644 --- a/xlators/protocol/server/src/server-resolve.c +++ b/xlators/protocol/server/src/server-resolve.c @@ -457,10 +457,9 @@ out:                  inode_unref (inode);          if (ret != 0) -                gf_msg ("server", GF_LOG_DEBUG, 0, -                        PS_MSG_ANONYMOUS_FD_CREATE_FAILED, "inode for the gfid" -                        "(%s) is not found. anonymous fd creation failed", -                        uuid_utoa (resolve->gfid)); +                gf_msg_debug ("server", 0, "inode for the gfid" +                              "(%s) is not found. anonymous fd creation failed", +                              uuid_utoa (resolve->gfid));          return ret;  } diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index d2a829f0363..28af53ee05f 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -2095,11 +2095,11 @@ server_ipc_cbk (call_frame_t *frame, void *cookie, xlator_t *this,                                      rsp.xdata.xdata_len, op_errno, out);          if (op_ret) { -                gf_log (this->name, GF_LOG_INFO, -                        "%"PRId64": IPC%"PRId64" (%s) ==> (%s)", +                gf_msg (this->name, GF_LOG_INFO, op_errno, +                        PS_MSG_SERVER_IPC_INFO, +                        "%"PRId64": IPC%"PRId64" (%s)",                          frame->root->unique, state->resolve.fd_no, -                        uuid_utoa (state->resolve.gfid), -                        strerror (op_errno)); +                        uuid_utoa (state->resolve.gfid));                  goto out;          } diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index a8329cf80dc..93cf45d5904 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -102,7 +102,8 @@ gfs_serialize_reply (rpcsvc_request_t *req, void *arg, struct iovec *outmsg,                  xdr_size = xdr_sizeof (xdrproc, arg);                  iob = iobuf_get2 (req->svc->ctx->iobuf_pool, xdr_size);                  if (!iob) { -                        gf_log_callingfn (THIS->name, GF_LOG_ERROR, +                        gf_msg_callingfn (THIS->name, GF_LOG_ERROR, ENOMEM, +                                          PS_MSG_NO_MEMORY,                                            "Failed to get iobuf");                          goto ret;                  }; @@ -120,7 +121,9 @@ gfs_serialize_reply (rpcsvc_request_t *req, void *arg, struct iovec *outmsg,                          /* Failed to Encode 'GlusterFS' msg in RPC is not exactly                             failure of RPC return values.. client should get                             notified about this, so there are no missing frames */ -                        gf_log_callingfn ("", GF_LOG_ERROR, "Failed to encode message"); +                        gf_msg_callingfn ("", GF_LOG_ERROR, 0, +                                          PS_MSG_ENCODE_MSG_FAILED, +                                          "Failed to encode message");                          req->rpc_err = GARBAGE_ARGS;                          retlen = 0;                  } @@ -192,12 +195,15 @@ server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg,           */          iobuf_unref (iob);          if (ret == -1) { -                gf_log_callingfn ("", GF_LOG_ERROR, "Reply submission failed"); +                gf_msg_callingfn ("", GF_LOG_ERROR, 0, +                                  PS_MSG_REPLY_SUBMIT_FAILED, +                                  "Reply submission failed");                  if (frame && client && !lk_heal) {                          server_connection_cleanup (frame->this, client,                                                    INTERNAL_LOCKS | POSIX_LOCKS);                  } else { -                        gf_log_callingfn ("", GF_LOG_ERROR, +                        gf_msg_callingfn ("", GF_LOG_ERROR, 0, +                                          PS_MSG_REPLY_SUBMIT_FAILED,                                            "Reply submission failed");                          /* TODO: Failure of open(dir), create, inodelk, entrylk                             or lk fops send failure must be handled specially. */ @@ -483,7 +489,8 @@ server_rpc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event,          server_ctx_t        *serv_ctx   = NULL;          if (!xl || !data) { -                gf_log_callingfn ("server", GF_LOG_WARNING, +                gf_msg_callingfn ("server", GF_LOG_WARNING, 0, +                                  PS_MSG_RPC_NOTIFY_ERROR,                                    "Calling rpc_notify without initializing");                  goto out;          } @@ -724,7 +731,8 @@ reconfigure (xlator_t *this, dict_t *options)          conf = this->private;          if (!conf) { -                gf_log_callingfn (this->name, GF_LOG_DEBUG, "conf == null!!!"); +                gf_msg_callingfn (this->name, GF_LOG_DEBUG, EINVAL, +                                  PS_MSG_INVALID_ENTRY, "conf == null!!!");                  goto out;          } @@ -1153,7 +1161,8 @@ server_process_event_upcall (xlator_t *this, void *data)                  xdrproc = (xdrproc_t)xdr_gfs3_cbk_cache_invalidation_req;                  break;          default: -                gf_log (this->name, GF_LOG_WARNING, +                gf_msg (this->name, GF_LOG_WARNING, EINVAL, +                        PS_MSG_INVALID_ENTRY,                          "Received invalid upcall event(%d)",                          upcall_data->event_type);                  goto out; @@ -1206,7 +1215,8 @@ notify (xlator_t *this, int32_t event, void *data, ...)                  ret = server_process_event_upcall (this, data);                  if (ret) { -                        gf_log (this->name, GF_LOG_ERROR, +                        gf_msg (this->name, GF_LOG_ERROR, 0, +                                PS_MSG_SERVER_EVENT_UPCALL_FAILED,                                  "server_process_event_upcall failed");                          goto out;                  }  | 
