summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorVenky Shankar <venky@gluster.com>2011-04-25 03:10:01 +0000
committerAnand Avati <avati@gluster.com>2011-05-20 11:01:49 -0700
commit2cd8411a0278f98ed820aad3e482de079d0540c0 (patch)
tree66cd9fa15fe8d269277b41469c3f45a12f59c24b /rpc
parent03c58c782d99440a5947289d0ff216bca8ef7c57 (diff)
cli log level command and per translator log level
Signed-off-by: Venky Shankar <venky@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2714 (implement cli log level command) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2714
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/protocol-common.h2
-rw-r--r--rpc/xdr/src/cli1-xdr.c30
-rw-r--r--rpc/xdr/src/cli1-xdr.h18
-rw-r--r--rpc/xdr/src/cli1-xdr.x12
-rw-r--r--rpc/xdr/src/cli1.c36
-rw-r--r--rpc/xdr/src/cli1.h15
6 files changed, 113 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index a54c29fc55a..83ea1fc81c1 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -108,6 +108,7 @@ enum gf_mgmt_procnum_ {
GD_MGMT_CLI_GSYNC_SET,
GD_MGMT_CLI_PROFILE_VOLUME,
GD_MGMT_BRICK_OP,
+ GD_MGMT_CLI_LOG_LEVEL,
GD_MGMT_MAXVALUE,
};
@@ -199,6 +200,7 @@ enum gluster_cli_procnum {
GLUSTER_CLI_QUOTA,
GLUSTER_CLI_TOP_VOLUME,
GLUSTER_CLI_GETWD,
+ GLUSTER_CLI_LOG_LEVEL,
GLUSTER_CLI_MAXVALUE,
};
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
index e525bb755c5..5c3bc0c47be 100644
--- a/rpc/xdr/src/cli1-xdr.c
+++ b/rpc/xdr/src/cli1-xdr.c
@@ -804,3 +804,33 @@ xdr_gf1_cli_getwd_rsp (XDR *xdrs, gf1_cli_getwd_rsp *objp)
return FALSE;
return TRUE;
}
+
+bool_t
+xdr_gf1_cli_log_level_req (XDR *xdrs, gf1_cli_log_level_req *objp)
+{
+ if (!xdr_string (xdrs, &objp->volname, ~0))
+ return FALSE;
+
+ if (!xdr_string (xdrs, &objp->xlator, ~0))
+ return FALSE;
+
+ if (!xdr_string (xdrs, &objp->loglevel, ~0))
+ return FALSE;
+
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_log_level_rsp (XDR *xdrs, gf1_cli_log_level_rsp *objp)
+{
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
+
+ return TRUE;
+}
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h
index 42e5cbff860..6d65ead6a44 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -514,6 +514,20 @@ struct gf1_cli_getwd_rsp {
};
typedef struct gf1_cli_getwd_rsp gf1_cli_getwd_rsp;
+struct gf1_cli_log_level_req {
+ char *volname;
+ char *xlator;
+ char *loglevel;
+};
+typedef struct gf1_cli_log_level_req gf1_cli_log_level_req;
+
+struct gf1_cli_log_level_rsp {
+ int op_ret;
+ int op_errno;
+ char *op_errstr;
+};
+typedef struct gf1_cli_log_level_rsp gf1_cli_log_level_rsp;
+
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
@@ -574,6 +588,8 @@ extern bool_t xdr_gf1_cli_gsync_set_req (XDR *, gf1_cli_gsync_set_req*);
extern bool_t xdr_gf1_cli_gsync_set_rsp (XDR *, gf1_cli_gsync_set_rsp*);
extern bool_t xdr_gf1_cli_stats_volume_req (XDR *, gf1_cli_stats_volume_req*);
extern bool_t xdr_gf1_cli_stats_volume_rsp (XDR *, gf1_cli_stats_volume_rsp*);
+extern bool_t xdr_gf1_cli_log_level_req (XDR *, gf1_cli_log_level_req *);
+extern bool_t xdr_gf1_cli_log_level_rsp (XDR *, gf1_cli_log_level_rsp *);
extern bool_t xdr_gf1_cli_getwd_req (XDR *, gf1_cli_getwd_req*);
extern bool_t xdr_gf1_cli_getwd_rsp (XDR *, gf1_cli_getwd_rsp*);
@@ -635,6 +651,8 @@ extern bool_t xdr_gf1_cli_gsync_set_req ();
extern bool_t xdr_gf1_cli_gsync_set_rsp ();
extern bool_t xdr_gf1_cli_stats_volume_req ();
extern bool_t xdr_gf1_cli_stats_volume_rsp ();
+extern bool_t xdr_gf1_cli_log_level_req ();
+extern bool_t xdr_gf1_cli_log_level_rsp ();
extern bool_t xdr_gf1_cli_getwd_req ();
extern bool_t xdr_gf1_cli_getwd_rsp ();
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x
index 4b15dcd2957..ee21d4bb3d8 100644
--- a/rpc/xdr/src/cli1-xdr.x
+++ b/rpc/xdr/src/cli1-xdr.x
@@ -376,3 +376,15 @@ struct gf1_cli_getwd_rsp {
int op_errno;
string wd<>;
};
+
+struct gf1_cli_log_level_req {
+ char *volname;
+ char *xlator;
+ char *loglevel;
+};
+
+struct gf1_cli_log_level_rsp {
+ int op_ret;
+ int op_errno;
+ char *op_errstr;
+};
diff --git a/rpc/xdr/src/cli1.c b/rpc/xdr/src/cli1.c
index e917929b349..78ef24f3dfd 100644
--- a/rpc/xdr/src/cli1.c
+++ b/rpc/xdr/src/cli1.c
@@ -740,3 +740,39 @@ gf_xdr_from_cli_getwd_rsp (struct iovec outmsg, void *args)
return xdr_serialize_generic (outmsg, (void *)args,
(xdrproc_t)xdr_gf1_cli_getwd_rsp);
}
+
+ssize_t
+gf_xdr_serialize_cli_log_level_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_log_level_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_log_level_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_level_req);
+}
+
+ssize_t
+gf_xdr_from_cli_log_level_req (struct iovec outmsg, void *args)
+{
+ return xdr_serialize_generic (outmsg, (void*)args,
+ (xdrproc_t)xdr_gf1_cli_log_level_req);
+}
+
+ssize_t
+gf_xdr_to_cli_log_level_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_level_rsp);
+}
+
+ssize_t
+gf_xdr_from_cli_log_level_rsp (struct iovec outmsg, void *args)
+{
+ return xdr_serialize_generic (outmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_level_rsp);
+}
diff --git a/rpc/xdr/src/cli1.h b/rpc/xdr/src/cli1.h
index 32e310aae83..26b142031a8 100644
--- a/rpc/xdr/src/cli1.h
+++ b/rpc/xdr/src/cli1.h
@@ -317,6 +317,21 @@ ssize_t
gf_xdr_from_cli_stats_volume_rsp (struct iovec outmsg, void *args);
ssize_t
+gf_xdr_serialize_cli_log_level_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_log_level_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_log_level_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_log_level_req (struct iovec outmsg, void *req);
+
+ssize_t
+gf_xdr_serialize_cli_log_level_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
gf_xdr_to_cli_getwd_req (struct iovec inmsg, void *args);
ssize_t