summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2012-02-14 15:27:49 +0530
committerAnand Avati <avati@redhat.com>2012-02-14 04:34:06 -0800
commit5f002b5418b557fd03ce59fbfd5d41272bdf491a (patch)
tree16d04d59e28a4c02dc9b37b5ee38ae80da3c190d /rpc/xdr/src
parent69a7f2fea23880fbdc776b657dd6aa32c643c6c4 (diff)
protocol xdr: remove 'path<>'
client was sending 'path' on wire, which gets ignored on server side, and also doesn't get freed up, which causes memory leak. also with not having path on wire, the xdr size on wire most of the time can remain constant, which helps in allocating RDMA buffers. Change-Id: Ie0d36a670be60b02fd1e925c6f977b1a71def5cd BUG: 790298 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/2744 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc/xdr/src')
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.c42
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.h21
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.x21
3 files changed, 0 insertions, 84 deletions
diff --git a/rpc/xdr/src/glusterfs3-xdr.c b/rpc/xdr/src/glusterfs3-xdr.c
index 33d1a609847..75ef044a006 100644
--- a/rpc/xdr/src/glusterfs3-xdr.c
+++ b/rpc/xdr/src/glusterfs3-xdr.c
@@ -249,8 +249,6 @@ xdr_gfs3_stat_req (XDR *xdrs, gfs3_stat_req *objp)
if (!xdr_opaque (xdrs, objp->gfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -283,8 +281,6 @@ xdr_gfs3_readlink_req (XDR *xdrs, gfs3_readlink_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->size))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -321,8 +317,6 @@ xdr_gfs3_mknod_req (XDR *xdrs, gfs3_mknod_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->mode))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
@@ -363,8 +357,6 @@ xdr_gfs3_mkdir_req (XDR *xdrs, gfs3_mkdir_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->mode))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
@@ -403,8 +395,6 @@ xdr_gfs3_unlink_req (XDR *xdrs, gfs3_unlink_req *objp)
if (!xdr_opaque (xdrs, objp->pargfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
@@ -441,8 +431,6 @@ xdr_gfs3_rmdir_req (XDR *xdrs, gfs3_rmdir_req *objp)
return FALSE;
if (!xdr_int (xdrs, &objp->flags))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
@@ -477,8 +465,6 @@ xdr_gfs3_symlink_req (XDR *xdrs, gfs3_symlink_req *objp)
if (!xdr_opaque (xdrs, objp->pargfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_string (xdrs, &objp->linkname, ~0))
@@ -611,8 +597,6 @@ xdr_gfs3_truncate_req (XDR *xdrs, gfs3_truncate_req *objp)
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->offset))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -649,8 +633,6 @@ xdr_gfs3_open_req (XDR *xdrs, gfs3_open_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->wbflags))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -725,8 +707,6 @@ xdr_gfs3_lookup_req (XDR *xdrs, gfs3_lookup_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->flags))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
@@ -805,8 +785,6 @@ xdr_gfs3_statfs_req (XDR *xdrs, gfs3_statfs_req *objp)
if (!xdr_opaque (xdrs, objp->gfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -881,8 +859,6 @@ xdr_gfs3_inodelk_req (XDR *xdrs, gfs3_inodelk_req *objp)
return FALSE;
if (!xdr_gf_proto_flock (xdrs, &objp->flock))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->volume, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
@@ -976,8 +952,6 @@ xdr_gfs3_setxattr_req (XDR *xdrs, gfs3_setxattr_req *objp)
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -1014,8 +988,6 @@ xdr_gfs3_xattrop_req (XDR *xdrs, gfs3_xattrop_req *objp)
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -1084,8 +1056,6 @@ xdr_gfs3_getxattr_req (XDR *xdrs, gfs3_getxattr_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->namelen))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->name, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
@@ -1154,8 +1124,6 @@ xdr_gfs3_removexattr_req (XDR *xdrs, gfs3_removexattr_req *objp)
if (!xdr_opaque (xdrs, objp->gfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->name, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
@@ -1188,8 +1156,6 @@ xdr_gfs3_opendir_req (XDR *xdrs, gfs3_opendir_req *objp)
if (!xdr_opaque (xdrs, objp->gfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -1303,8 +1269,6 @@ xdr_gfs3_access_req (XDR *xdrs, gfs3_access_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->mask))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -1322,8 +1286,6 @@ xdr_gfs3_create_req (XDR *xdrs, gfs3_create_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->mode))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
@@ -1438,8 +1400,6 @@ xdr_gfs3_entrylk_req (XDR *xdrs, gfs3_entrylk_req *objp)
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->namelen))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->name, ~0))
return FALSE;
if (!xdr_string (xdrs, &objp->volume, ~0))
@@ -1486,8 +1446,6 @@ xdr_gfs3_setattr_req (XDR *xdrs, gfs3_setattr_req *objp)
return FALSE;
if (!xdr_int (xdrs, &objp->valid))
return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
diff --git a/rpc/xdr/src/glusterfs3-xdr.h b/rpc/xdr/src/glusterfs3-xdr.h
index 0b631e786ae..17628056a72 100644
--- a/rpc/xdr/src/glusterfs3-xdr.h
+++ b/rpc/xdr/src/glusterfs3-xdr.h
@@ -93,7 +93,6 @@ typedef struct gf_iatt gf_iatt;
struct gfs3_stat_req {
char gfid[16];
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -115,7 +114,6 @@ typedef struct gfs3_stat_rsp gfs3_stat_rsp;
struct gfs3_readlink_req {
char gfid[16];
u_int size;
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -139,7 +137,6 @@ struct gfs3_mknod_req {
char pargfid[16];
u_quad_t dev;
u_int mode;
- char *path;
char *bname;
struct {
u_int dict_len;
@@ -168,7 +165,6 @@ typedef struct gfs3_mknod_rsp gfs3_mknod_rsp;
struct gfs3_mkdir_req {
char pargfid[16];
u_int mode;
- char *path;
char *bname;
struct {
u_int dict_len;
@@ -196,7 +192,6 @@ typedef struct gfs3_mkdir_rsp gfs3_mkdir_rsp;
struct gfs3_unlink_req {
char pargfid[16];
- char *path;
char *bname;
struct {
u_int xdata_len;
@@ -220,7 +215,6 @@ typedef struct gfs3_unlink_rsp gfs3_unlink_rsp;
struct gfs3_rmdir_req {
char pargfid[16];
int flags;
- char *path;
char *bname;
struct {
u_int xdata_len;
@@ -243,7 +237,6 @@ typedef struct gfs3_rmdir_rsp gfs3_rmdir_rsp;
struct gfs3_symlink_req {
char pargfid[16];
- char *path;
char *bname;
char *linkname;
struct {
@@ -328,7 +321,6 @@ typedef struct gfs3_link_rsp gfs3_link_rsp;
struct gfs3_truncate_req {
char gfid[16];
u_quad_t offset;
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -352,7 +344,6 @@ struct gfs3_open_req {
char gfid[16];
u_int flags;
u_int wbflags;
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -400,7 +391,6 @@ struct gfs3_lookup_req {
char gfid[16];
char pargfid[16];
u_int flags;
- char *path;
char *bname;
struct {
u_int dict_len;
@@ -456,7 +446,6 @@ typedef struct gfs3_write_rsp gfs3_write_rsp;
struct gfs3_statfs_req {
char gfid[16];
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -504,7 +493,6 @@ struct gfs3_inodelk_req {
u_int cmd;
u_int type;
struct gf_proto_flock flock;
- char *path;
char *volume;
struct {
u_int xdata_len;
@@ -567,7 +555,6 @@ struct gfs3_setxattr_req {
u_int dict_len;
char *dict_val;
} dict;
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -597,7 +584,6 @@ struct gfs3_xattrop_req {
u_int dict_len;
char *dict_val;
} dict;
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -651,7 +637,6 @@ typedef struct gfs3_fxattrop_rsp gfs3_fxattrop_rsp;
struct gfs3_getxattr_req {
char gfid[16];
u_int namelen;
- char *path;
char *name;
struct {
u_int xdata_len;
@@ -702,7 +687,6 @@ typedef struct gfs3_fgetxattr_rsp gfs3_fgetxattr_rsp;
struct gfs3_removexattr_req {
char gfid[16];
- char *path;
char *name;
struct {
u_int xdata_len;
@@ -724,7 +708,6 @@ typedef struct gfs3_fremovexattr_req gfs3_fremovexattr_req;
struct gfs3_opendir_req {
char gfid[16];
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -799,7 +782,6 @@ typedef struct gf_setvolume_rsp gf_setvolume_rsp;
struct gfs3_access_req {
char gfid[16];
u_int mask;
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
@@ -811,7 +793,6 @@ struct gfs3_create_req {
char pargfid[16];
u_int flags;
u_int mode;
- char *path;
char *bname;
struct {
u_int dict_len;
@@ -887,7 +868,6 @@ struct gfs3_entrylk_req {
u_int cmd;
u_int type;
u_quad_t namelen;
- char *path;
char *name;
char *volume;
struct {
@@ -916,7 +896,6 @@ struct gfs3_setattr_req {
char gfid[16];
struct gf_iatt stbuf;
int valid;
- char *path;
struct {
u_int xdata_len;
char *xdata_val;
diff --git a/rpc/xdr/src/glusterfs3-xdr.x b/rpc/xdr/src/glusterfs3-xdr.x
index 89b5d34e517..651190c19a5 100644
--- a/rpc/xdr/src/glusterfs3-xdr.x
+++ b/rpc/xdr/src/glusterfs3-xdr.x
@@ -45,7 +45,6 @@ struct gf_iatt {
struct gfs3_stat_req {
opaque gfid[16];
- string path<>; /* NULL terminated */
opaque xdata<>; /* Extra data */
};
struct gfs3_stat_rsp {
@@ -59,7 +58,6 @@ struct gfs3_stat_rsp {
struct gfs3_readlink_req {
opaque gfid[16];
unsigned int size;
- string path<>; /* NULL terminated */
opaque xdata<>; /* Extra data */
} ;
struct gfs3_readlink_rsp {
@@ -75,7 +73,6 @@ struct gfs3_readlink_req {
opaque pargfid[16];
unsigned hyper dev;
unsigned int mode;
- string path<>; /* NULL terminated */
string bname<>; /* NULL terminated */
opaque dict<>;
opaque xdata<>; /* Extra data */
@@ -93,7 +90,6 @@ struct gfs3_readlink_req {
struct gfs3_mkdir_req {
opaque pargfid[16];
unsigned int mode;
- string path<>; /* NULL terminated */
string bname<>; /* NULL terminated */
opaque dict<>;
opaque xdata<>; /* Extra data */
@@ -110,7 +106,6 @@ struct gfs3_readlink_req {
struct gfs3_unlink_req {
opaque pargfid[16];
- string path<>; /* NULL terminated */
string bname<>; /* NULL terminated */
opaque xdata<>; /* Extra data */
};
@@ -126,7 +121,6 @@ struct gfs3_readlink_req {
struct gfs3_rmdir_req {
opaque pargfid[16];
int flags;
- string path<>;
string bname<>; /* NULL terminated */
opaque xdata<>; /* Extra data */
};
@@ -141,7 +135,6 @@ struct gfs3_readlink_req {
struct gfs3_symlink_req {
opaque pargfid[16];
- string path<>;
string bname<>;
string linkname<>;
opaque dict<>;
@@ -198,7 +191,6 @@ struct gfs3_readlink_req {
struct gfs3_truncate_req {
opaque gfid[16];
unsigned hyper offset;
- string path<>;
opaque xdata<>; /* Extra data */
};
struct gfs3_truncate_rsp {
@@ -214,7 +206,6 @@ struct gfs3_readlink_req {
opaque gfid[16];
unsigned int flags;
unsigned int wbflags;
- string path<>;
opaque xdata<>; /* Extra data */
};
struct gfs3_open_rsp {
@@ -245,7 +236,6 @@ struct gfs3_lookup_req {
opaque gfid[16];
opaque pargfid[16];
unsigned int flags;
- string path<>;
string bname<>;
opaque dict<>;
opaque xdata<>; /* Extra data */
@@ -280,7 +270,6 @@ struct gfs3_lookup_req {
struct gfs3_statfs_req {
opaque gfid[16];
- string path<>;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_statfs_rsp {
@@ -310,7 +299,6 @@ struct gfs3_lookup_req {
unsigned int cmd;
unsigned int type;
struct gf_proto_flock flock;
- string path<>;
string volume<>;
opaque xdata<>; /* Extra data */
} ;
@@ -352,7 +340,6 @@ struct gfs3_finodelk_req {
opaque gfid[16];
unsigned int flags;
opaque dict<>;
- string path<>;
opaque xdata<>; /* Extra data */
} ;
@@ -372,7 +359,6 @@ struct gfs3_finodelk_req {
opaque gfid[16];
unsigned int flags;
opaque dict<>;
- string path<>;
opaque xdata<>; /* Extra data */
} ;
@@ -403,7 +389,6 @@ struct gfs3_finodelk_req {
struct gfs3_getxattr_req {
opaque gfid[16];
unsigned int namelen;
- string path<>;
string name<>;
opaque xdata<>; /* Extra data */
} ;
@@ -432,7 +417,6 @@ struct gfs3_finodelk_req {
struct gfs3_removexattr_req {
opaque gfid[16];
- string path<>;
string name<>;
opaque xdata<>; /* Extra data */
} ;
@@ -448,7 +432,6 @@ struct gfs3_finodelk_req {
struct gfs3_opendir_req {
opaque gfid[16];
- string path<>;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_opendir_rsp {
@@ -495,7 +478,6 @@ struct gfs3_finodelk_req {
struct gfs3_access_req {
opaque gfid[16];
unsigned int mask;
- string path<>;
opaque xdata<>; /* Extra data */
} ;
@@ -504,7 +486,6 @@ struct gfs3_create_req {
opaque pargfid[16];
unsigned int flags;
unsigned int mode;
- string path<>;
string bname<>;
opaque dict<>;
opaque xdata<>; /* Extra data */
@@ -555,7 +536,6 @@ struct gfs3_fstat_req {
unsigned int cmd;
unsigned int type;
unsigned hyper namelen;
- string path<>;
string name<>;
string volume<>;
opaque xdata<>; /* Extra data */
@@ -577,7 +557,6 @@ struct gfs3_fstat_req {
opaque gfid[16];
struct gf_iatt stbuf;
int valid;
- string path<>;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_setattr_rsp {