summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-31 07:51:14 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-31 10:49:40 -0700
commit6530488a49ed0c9395b091c42b148091075a9d86 (patch)
tree18c85cb3bfa4fc0f0dce0aef27bf6af1ade19af9 /rpc
parentda5bf7cf104cd060b2f94d47132029689bfff685 (diff)
'gluster volume log' feature added
* 'gluster volume log filename <VOLNAME> [BRICK] <path>' * 'gluster volume log locate <VOLNAME> [BRICK]' * 'gluster volume log rotate <VOLUME> [BRICK]' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/protocol-common.h6
-rw-r--r--rpc/xdr/src/cli1-xdr.c71
-rw-r--r--rpc/xdr/src/cli1-xdr.h54
-rw-r--r--rpc/xdr/src/cli1.c88
-rw-r--r--rpc/xdr/src/cli1.h39
-rw-r--r--rpc/xdr/src/cli1.x34
6 files changed, 292 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index fdb42dfe663..14b81faba3c 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -99,6 +99,9 @@ enum gf_mgmt_procnum_ {
GD_MGMT_CLI_ADD_BRICK,
GD_MGMT_CLI_REMOVE_BRICK,
GD_MGMT_CLI_REPLACE_BRICK,
+ GD_MGMT_CLI_LOG_FILENAME,
+ GD_MGMT_CLI_LOG_LOCATE,
+ GD_MGMT_CLI_LOG_ROTATE,
GD_MGMT_MAXVALUE,
};
@@ -120,6 +123,9 @@ enum gf_cli_procnum {
GF1_CLI_ADD_BRICK,
GF1_CLI_REMOVE_BRICK,
GF1_CLI_REPLACE_BRICK,
+ GF1_CLI_LOG_FILENAME,
+ GF1_CLI_LOG_LOCATE,
+ GF1_CLI_LOG_ROTATE,
GF1_CLI_MAXVALUE,
};
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
index 64112c1797a..c0d488e7f9d 100644
--- a/rpc/xdr/src/cli1-xdr.c
+++ b/rpc/xdr/src/cli1-xdr.c
@@ -467,3 +467,74 @@ xdr_gf1_cli_set_vol_rsp (XDR *xdrs, gf1_cli_set_vol_rsp *objp)
return FALSE;
return TRUE;
}
+
+
+bool_t
+xdr_gf1_cli_log_filename_req (XDR *xdrs, gf1_cli_log_filename_req *objp)
+{
+ if (!xdr_string (xdrs, &objp->volname, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->brick, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->path, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_log_filename_rsp (XDR *xdrs, gf1_cli_log_filename_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->errstr, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+
+bool_t
+xdr_gf1_cli_log_locate_req (XDR *xdrs, gf1_cli_log_locate_req *objp)
+{
+ if (!xdr_string (xdrs, &objp->volname, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->brick, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_log_locate_rsp (XDR *xdrs, gf1_cli_log_locate_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->path, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+
+bool_t
+xdr_gf1_cli_log_rotate_req (XDR *xdrs, gf1_cli_log_rotate_req *objp)
+{
+ if (!xdr_string (xdrs, &objp->volname, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->brick, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_log_rotate_rsp (XDR *xdrs, gf1_cli_log_rotate_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->errstr, ~0))
+ return FALSE;
+ return TRUE;
+}
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h
index 55060bf693d..64bae26f4ef 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -286,6 +286,47 @@ struct gf1_cli_set_vol_rsp {
};
typedef struct gf1_cli_set_vol_rsp gf1_cli_set_vol_rsp;
+struct gf1_cli_log_filename_req {
+ char *volname;
+ char *brick;
+ char *path;
+};
+typedef struct gf1_cli_log_filename_req gf1_cli_log_filename_req;
+
+struct gf1_cli_log_filename_rsp {
+ int op_ret;
+ int op_errno;
+ char *errstr;
+};
+typedef struct gf1_cli_log_filename_rsp gf1_cli_log_filename_rsp;
+
+struct gf1_cli_log_locate_req {
+ char *volname;
+ char *brick;
+};
+typedef struct gf1_cli_log_locate_req gf1_cli_log_locate_req;
+
+struct gf1_cli_log_locate_rsp {
+ int op_ret;
+ int op_errno;
+ char *path;
+};
+typedef struct gf1_cli_log_locate_rsp gf1_cli_log_locate_rsp;
+
+struct gf1_cli_log_rotate_req {
+ char *volname;
+ char *brick;
+};
+typedef struct gf1_cli_log_rotate_req gf1_cli_log_rotate_req;
+
+struct gf1_cli_log_rotate_rsp {
+ int op_ret;
+ int op_errno;
+ char *errstr;
+};
+typedef struct gf1_cli_log_rotate_rsp gf1_cli_log_rotate_rsp;
+
+
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
@@ -322,6 +363,13 @@ extern bool_t xdr_gf1_cli_replace_brick_req (XDR *, gf1_cli_replace_brick_req*)
extern bool_t xdr_gf1_cli_replace_brick_rsp (XDR *, gf1_cli_replace_brick_rsp*);
extern bool_t xdr_gf1_cli_set_vol_req (XDR *, gf1_cli_set_vol_req*);
extern bool_t xdr_gf1_cli_set_vol_rsp (XDR *, gf1_cli_set_vol_rsp*);
+extern bool_t xdr_gf1_cli_log_filename_req (XDR *, gf1_cli_log_filename_req*);
+extern bool_t xdr_gf1_cli_log_filename_rsp (XDR *, gf1_cli_log_filename_rsp*);
+extern bool_t xdr_gf1_cli_log_locate_req (XDR *, gf1_cli_log_locate_req*);
+extern bool_t xdr_gf1_cli_log_locate_rsp (XDR *, gf1_cli_log_locate_rsp*);
+extern bool_t xdr_gf1_cli_log_rotate_req (XDR *, gf1_cli_log_rotate_req*);
+extern bool_t xdr_gf1_cli_log_rotate_rsp (XDR *, gf1_cli_log_rotate_rsp*);
+
#else /* K&R C */
extern bool_t xdr_gf1_cluster_type ();
@@ -357,6 +405,12 @@ extern bool_t xdr_gf1_cli_replace_brick_req ();
extern bool_t xdr_gf1_cli_replace_brick_rsp ();
extern bool_t xdr_gf1_cli_set_vol_req ();
extern bool_t xdr_gf1_cli_set_vol_rsp ();
+extern bool_t xdr_gf1_cli_log_filename_req ();
+extern bool_t xdr_gf1_cli_log_filename_rsp ();
+extern bool_t xdr_gf1_cli_log_locate_req ();
+extern bool_t xdr_gf1_cli_log_locate_rsp ();
+extern bool_t xdr_gf1_cli_log_rotate_req ();
+extern bool_t xdr_gf1_cli_log_rotate_rsp ();
#endif /* K&R C */
diff --git a/rpc/xdr/src/cli1.c b/rpc/xdr/src/cli1.c
index 317bbd7f1b3..d7ba91aea89 100644
--- a/rpc/xdr/src/cli1.c
+++ b/rpc/xdr/src/cli1.c
@@ -435,3 +435,91 @@ gf_xdr_from_cli_set_vol_req (struct iovec outmsg, void *req)
return xdr_serialize_generic (outmsg, (void *)req,
(xdrproc_t)xdr_gf1_cli_set_vol_req);
}
+
+/* log */
+ssize_t
+gf_xdr_serialize_cli_log_filename_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_log_filename_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_log_filename_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_filename_req);
+}
+
+ssize_t
+gf_xdr_to_cli_log_filename_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_filename_rsp);
+}
+
+ssize_t
+gf_xdr_from_cli_log_filename_req (struct iovec outmsg, void *req)
+{
+ return xdr_serialize_generic (outmsg, (void *)req,
+ (xdrproc_t)xdr_gf1_cli_log_filename_req);
+}
+
+ssize_t
+gf_xdr_serialize_cli_log_locate_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_log_locate_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_log_locate_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_locate_req);
+}
+
+ssize_t
+gf_xdr_to_cli_log_locate_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_locate_rsp);
+}
+
+ssize_t
+gf_xdr_from_cli_log_locate_req (struct iovec outmsg, void *req)
+{
+ return xdr_serialize_generic (outmsg, (void *)req,
+ (xdrproc_t)xdr_gf1_cli_log_locate_req);
+}
+
+ssize_t
+gf_xdr_serialize_cli_log_rotate_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_log_rotate_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_log_rotate_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_rotate_req);
+}
+
+ssize_t
+gf_xdr_to_cli_log_rotate_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_log_rotate_rsp);
+}
+
+ssize_t
+gf_xdr_from_cli_log_rotate_req (struct iovec outmsg, void *req)
+{
+ return xdr_serialize_generic (outmsg, (void *)req,
+ (xdrproc_t)xdr_gf1_cli_log_rotate_req);
+}
diff --git a/rpc/xdr/src/cli1.h b/rpc/xdr/src/cli1.h
index 288253dc677..31b2c9b75c6 100644
--- a/rpc/xdr/src/cli1.h
+++ b/rpc/xdr/src/cli1.h
@@ -197,4 +197,43 @@ gf_xdr_to_cli_get_vol_rsp (struct iovec inmsg, void *args);
ssize_t
gf_xdr_from_cli_get_vol_req (struct iovec outmsg, void *req);
+ssize_t
+gf_xdr_serialize_cli_log_filename_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_log_filename_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_log_filename_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_log_filename_req (struct iovec outmsg, void *req);
+
+
+ssize_t
+gf_xdr_serialize_cli_log_locate_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_log_locate_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_log_locate_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_log_locate_req (struct iovec outmsg, void *req);
+
+ssize_t
+gf_xdr_serialize_cli_log_rotate_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_log_rotate_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_log_rotate_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_log_rotate_req (struct iovec outmsg, void *req);
+
+
+
#endif /* !_CLI1_H */
diff --git a/rpc/xdr/src/cli1.x b/rpc/xdr/src/cli1.x
index d3383147268..0c4cbf83359 100644
--- a/rpc/xdr/src/cli1.x
+++ b/rpc/xdr/src/cli1.x
@@ -195,3 +195,37 @@ struct gf1_cli_set_vol_req {
int op_errno;
string volname<>;
} ;
+
+struct gf1_cli_log_filename_req {
+ string volname<>;
+ string brick<>;
+ string path<>;
+};
+
+struct gf1_cli_log_filename_rsp {
+ int op_ret;
+ int op_errno;
+ string errstr<>;
+};
+
+struct gf1_cli_log_locate_req {
+ string volname<>;
+ string brick<>;
+};
+
+struct gf1_cli_log_locate_rsp {
+ int op_ret;
+ int op_errno;
+ string path<>;
+};
+
+struct gf1_cli_log_rotate_req {
+ string volname<>;
+ string brick<>;
+};
+
+struct gf1_cli_log_rotate_rsp {
+ int op_ret;
+ int op_errno;
+ string errstr<>;
+};