summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/lib/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-07-07 08:05:58 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-08 02:24:23 -0700
commitc85998fec484a0060c2a7cbcbf7ed42a109c6478 (patch)
tree91aa4b8254c98dadc7907b6627e57daed5c540aa /xlators/protocol/lib/src
parent44604ecf4bfbef991bfcf5f0524ff044177d81a1 (diff)
make DUMP as another program
* on server side, make it a rpc program. * on client its another program at protocol Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/protocol/lib/src')
-rw-r--r--xlators/protocol/lib/src/glusterfs-xdr.c32
-rw-r--r--xlators/protocol/lib/src/glusterfs-xdr.h23
-rw-r--r--xlators/protocol/lib/src/glusterfs3.x21
-rw-r--r--xlators/protocol/lib/src/msg-xdr.c32
-rw-r--r--xlators/protocol/lib/src/msg-xdr.h12
-rw-r--r--xlators/protocol/lib/src/protocol-common.h1
6 files changed, 11 insertions, 110 deletions
diff --git a/xlators/protocol/lib/src/glusterfs-xdr.c b/xlators/protocol/lib/src/glusterfs-xdr.c
index cbc4d7cef47..92b8c2ed247 100644
--- a/xlators/protocol/lib/src/glusterfs-xdr.c
+++ b/xlators/protocol/lib/src/glusterfs-xdr.c
@@ -1667,38 +1667,6 @@ xdr_gf_common_rsp (XDR *xdrs, gf_common_rsp *objp)
bool_t
-xdr_gf_dump_version_req (XDR *xdrs, gf_dump_version_req *objp)
-{
-
- if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->flags))
- return FALSE;
- if (!xdr_string (xdrs, &objp->key, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_dump_version_rsp (XDR *xdrs, gf_dump_version_rsp *objp)
-{
-
- if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->flags))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->msg.msg_val, (u_int *) &objp->msg.msg_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-
-
-bool_t
xdr_gfs3_dirlist (XDR *xdrs, gfs3_dirlist *objp)
{
if (!xdr_u_quad_t (xdrs, &objp->d_ino))
diff --git a/xlators/protocol/lib/src/glusterfs-xdr.h b/xlators/protocol/lib/src/glusterfs-xdr.h
index 45ce3ff9bed..a3afe8861ac 100644
--- a/xlators/protocol/lib/src/glusterfs-xdr.h
+++ b/xlators/protocol/lib/src/glusterfs-xdr.h
@@ -1063,25 +1063,6 @@ struct gf_common_rsp {
};
typedef struct gf_common_rsp gf_common_rsp;
-struct gf_dump_version_req {
- u_quad_t gfs_id;
- u_int flags;
- char *key;
-};
-typedef struct gf_dump_version_req gf_dump_version_req;
-
-struct gf_dump_version_rsp {
- u_quad_t gfs_id;
- int op_ret;
- int op_errno;
- u_int flags;
- struct {
- u_int msg_len;
- char *msg_val;
- } msg;
-};
-typedef struct gf_dump_version_rsp gf_dump_version_rsp;
-
struct gfs3_dirlist {
u_quad_t d_ino;
u_quad_t d_off;
@@ -1208,8 +1189,6 @@ extern bool_t xdr_gf_notify_rsp (XDR *, gf_notify_rsp*);
extern bool_t xdr_gfs3_releasedir_req (XDR *, gfs3_releasedir_req*);
extern bool_t xdr_gfs3_release_req (XDR *, gfs3_release_req*);
extern bool_t xdr_gf_common_rsp (XDR *, gf_common_rsp*);
-extern bool_t xdr_gf_dump_version_req (XDR *, gf_dump_version_req *);
-extern bool_t xdr_gf_dump_version_rsp (XDR *, gf_dump_version_rsp *);
#else /* K&R C */
extern bool_t xdr_gf_statfs ();
@@ -1297,8 +1276,6 @@ extern bool_t xdr_gf_log_req ();
extern bool_t xdr_gf_notify_req ();
extern bool_t xdr_gf_notify_rsp ();
extern bool_t xdr_gf_common_rsp ();
-extern bool_t xdr_gf_dump_version_req ();
-extern bool_t xdr_gf_dump_version_rsp ();
#endif /* K&R C */
diff --git a/xlators/protocol/lib/src/glusterfs3.x b/xlators/protocol/lib/src/glusterfs3.x
index b2eb9556c02..cafe965efaf 100644
--- a/xlators/protocol/lib/src/glusterfs3.x
+++ b/xlators/protocol/lib/src/glusterfs3.x
@@ -732,19 +732,20 @@ struct gf_common_rsp {
} ;
-struct gf_dump_version_req {
- unsigned hyper gfs_id;
- unsigned int flags;
- string key<>;
+struct gf_dump_req {
+ unsigned hyper gfs_id;
};
+struct gf_prog_detail {
+ string progname<>;
+ unsigned hyper prognum;
+ unsigned hyper progver;
+ struct gf_prog_detail *next;
+};
-struct gf_dump_version_rsp {
- unsigned hyper gfs_id;
- int op_ret;
- int op_errno;
- unsigned int flags;
- opaque msg<>;
+struct gf_dump_rsp {
+ unsigned hyper gfs_id;
+ struct gf_prog_detail *prog;
};
struct auth_glusterfs_parms {
diff --git a/xlators/protocol/lib/src/msg-xdr.c b/xlators/protocol/lib/src/msg-xdr.c
index 3fe5ad5f65d..9227e715fd3 100644
--- a/xlators/protocol/lib/src/msg-xdr.c
+++ b/xlators/protocol/lib/src/msg-xdr.c
@@ -341,24 +341,6 @@ xdr_serialize_ftruncate_rsp (struct iovec outmsg, void *rsp)
ssize_t
-xdr_serialize_dump_version_rsp (struct iovec outmsg, void *rsp)
-{
- return xdr_serialize_generic (outmsg, (void *)rsp,
- (xdrproc_t)xdr_gf_dump_version_rsp);
-}
-
-
-/* Decode */
-
-
-ssize_t
-xdr_to_dump_version_req (struct iovec inmsg, void *args)
-{
- return xdr_to_generic (inmsg, (void *)args,
- (xdrproc_t)xdr_gf_dump_version_req);
-}
-
-ssize_t
xdr_to_lookup_req (struct iovec inmsg, void *args)
{
return xdr_to_generic (inmsg, (void *)args,
@@ -960,13 +942,6 @@ xdr_from_setvolume_req (struct iovec outmsg, void *req)
}
ssize_t
-xdr_from_dump_version_req (struct iovec outmsg, void *req)
-{
- return xdr_serialize_generic (outmsg, (void *)req,
- (xdrproc_t)xdr_gf_dump_version_req);
-
-}
-ssize_t
xdr_from_rmdir_req (struct iovec outmsg, void *req)
{
return xdr_serialize_generic (outmsg, (void *)req,
@@ -1207,13 +1182,6 @@ xdr_to_setvolume_rsp (struct iovec outmsg, void *rsp)
}
ssize_t
-xdr_to_dump_version_rsp (struct iovec outmsg, void *rsp)
-{
- return xdr_to_generic (outmsg, (void *)rsp,
- (xdrproc_t)xdr_gf_dump_version_rsp);
-
-}
-ssize_t
xdr_to_rmdir_rsp (struct iovec outmsg, void *rsp)
{
return xdr_to_generic (outmsg, (void *)rsp,
diff --git a/xlators/protocol/lib/src/msg-xdr.h b/xlators/protocol/lib/src/msg-xdr.h
index 59b6ca30112..025b7f8c717 100644
--- a/xlators/protocol/lib/src/msg-xdr.h
+++ b/xlators/protocol/lib/src/msg-xdr.h
@@ -406,23 +406,11 @@ ssize_t
xdr_from_release_req (struct iovec outmsg, void *args);
ssize_t
-xdr_from_dump_version_req (struct iovec outmsg, void *args);
-
-ssize_t
xdr_from_setvolume_req (struct iovec outmsg, void *args);
ssize_t
xdr_to_setvolume_rsp (struct iovec inmsg, void *args);
-ssize_t
-xdr_to_dump_version_rsp (struct iovec inmsg, void *args);
-
-
-ssize_t
-xdr_serialize_dump_version_rsp (struct iovec outmsg, void *args);
-
-ssize_t
-xdr_to_dump_version_req (struct iovec inmsg, void *args);
ssize_t
diff --git a/xlators/protocol/lib/src/protocol-common.h b/xlators/protocol/lib/src/protocol-common.h
index 5590960a6d9..78ee2581fdf 100644
--- a/xlators/protocol/lib/src/protocol-common.h
+++ b/xlators/protocol/lib/src/protocol-common.h
@@ -69,7 +69,6 @@ enum gf_fop_procnum {
enum gf_handshake_procnum {
GF_HNDSK_NULL,
- GF_HNDSK_DUMP_VERSION,
GF_HNDSK_SETVOLUME,
GF_HNDSK_GETSPEC,
GF_HNDSK_PING,