summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2012-02-15 19:48:50 +0530
committerAnand Avati <avati@redhat.com>2012-02-16 22:49:15 -0800
commit7fa06c4ce1a44bbd89d3798193f173c057533bb6 (patch)
treeea348fcf64aed97666ac26ce3e5380532c0ffbbe
parent47e748fe60c46d543c87f3228eb59d6580db8cf1 (diff)
protocol: remove the 'path<>' from rename() and link()
missed it in the previous round of cleanup, path is completely useless in resolve function. Change-Id: I1aef0f5276afb77dfacfcc0c337ac80b4fcacc55 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 790298 Reviewed-on: http://review.gluster.com/2756 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.c8
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.h4
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.x4
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c4
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c8
5 files changed, 0 insertions, 28 deletions
diff --git a/rpc/xdr/src/glusterfs3-xdr.c b/rpc/xdr/src/glusterfs3-xdr.c
index 75ef044a006..8008a747026 100644
--- a/rpc/xdr/src/glusterfs3-xdr.c
+++ b/rpc/xdr/src/glusterfs3-xdr.c
@@ -507,12 +507,8 @@ xdr_gfs3_rename_req (XDR *xdrs, gfs3_rename_req *objp)
return FALSE;
if (!xdr_opaque (xdrs, objp->newgfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->oldpath, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->oldbname, ~0))
return FALSE;
- if (!xdr_string (xdrs, &objp->newpath, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->newbname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
@@ -555,10 +551,6 @@ xdr_gfs3_link_req (XDR *xdrs, gfs3_link_req *objp)
return FALSE;
if (!xdr_opaque (xdrs, objp->newgfid, 16))
return FALSE;
- if (!xdr_string (xdrs, &objp->oldpath, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->newpath, ~0))
- return FALSE;
if (!xdr_string (xdrs, &objp->newbname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
diff --git a/rpc/xdr/src/glusterfs3-xdr.h b/rpc/xdr/src/glusterfs3-xdr.h
index 17628056a72..2b8129a3354 100644
--- a/rpc/xdr/src/glusterfs3-xdr.h
+++ b/rpc/xdr/src/glusterfs3-xdr.h
@@ -266,9 +266,7 @@ typedef struct gfs3_symlink_rsp gfs3_symlink_rsp;
struct gfs3_rename_req {
char oldgfid[16];
char newgfid[16];
- char *oldpath;
char *oldbname;
- char *newpath;
char *newbname;
struct {
u_int xdata_len;
@@ -295,8 +293,6 @@ typedef struct gfs3_rename_rsp gfs3_rename_rsp;
struct gfs3_link_req {
char oldgfid[16];
char newgfid[16];
- char *oldpath;
- char *newpath;
char *newbname;
struct {
u_int xdata_len;
diff --git a/rpc/xdr/src/glusterfs3-xdr.x b/rpc/xdr/src/glusterfs3-xdr.x
index 651190c19a5..710a9037807 100644
--- a/rpc/xdr/src/glusterfs3-xdr.x
+++ b/rpc/xdr/src/glusterfs3-xdr.x
@@ -153,9 +153,7 @@ struct gfs3_readlink_req {
struct gfs3_rename_req {
opaque oldgfid[16];
opaque newgfid[16];
- string oldpath<>;
string oldbname<>; /* NULL terminated */
- string newpath<>;
string newbname<>; /* NULL terminated */
opaque xdata<>; /* Extra data */
};
@@ -174,8 +172,6 @@ struct gfs3_readlink_req {
struct gfs3_link_req {
opaque oldgfid[16];
opaque newgfid[16];
- string oldpath<>;
- string newpath<>;
string newbname<>;
opaque xdata<>; /* Extra data */
};
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index e57373419ae..234b0dd6e03 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -2999,9 +2999,7 @@ client3_1_rename (call_frame_t *frame, xlator_t *this,
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
!uuid_is_null (*((uuid_t*)req.newgfid)),
unwind, op_errno, EINVAL);
- req.oldpath = (char *)args->oldloc->path;
req.oldbname = (char *)args->oldloc->name;
- req.newpath = (char *)args->newloc->path;
req.newbname = (char *)args->newloc->name;
conf = this->private;
@@ -3067,8 +3065,6 @@ client3_1_link (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->oldloc);
frame->local = local;
- req.oldpath = (char *)args->oldloc->path;
- req.newpath = (char *)args->newloc->path;
req.newbname = (char *)args->newloc->name;
conf = this->private;
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index 90f70256943..3dae07b0385 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -4598,8 +4598,6 @@ server_link (rpcsvc_request_t *req)
if (!req)
return ret;
- args.oldpath = alloca (req->msg[0].iov_len);
- args.newpath = alloca (req->msg[0].iov_len);
args.newbname = alloca (req->msg[0].iov_len);
if (!xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gfs3_link_req)) {
@@ -4624,11 +4622,9 @@ server_link (rpcsvc_request_t *req)
}
state->resolve.type = RESOLVE_MUST;
- state->resolve.path = gf_strdup (args.oldpath);
memcpy (state->resolve.gfid, args.oldgfid, 16);
state->resolve2.type = RESOLVE_NOT;
- state->resolve2.path = gf_strdup (args.newpath);
state->resolve2.bname = gf_strdup (args.newbname);
memcpy (state->resolve2.pargfid, args.newgfid, 16);
@@ -4650,9 +4646,7 @@ server_rename (rpcsvc_request_t *req)
if (!req)
return ret;
- args.oldpath = alloca (req->msg[0].iov_len);
args.oldbname = alloca (req->msg[0].iov_len);
- args.newpath = alloca (req->msg[0].iov_len);
args.newbname = alloca (req->msg[0].iov_len);
if (!xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gfs3_rename_req)) {
@@ -4677,12 +4671,10 @@ server_rename (rpcsvc_request_t *req)
}
state->resolve.type = RESOLVE_MUST;
- state->resolve.path = gf_strdup (args.oldpath);
state->resolve.bname = gf_strdup (args.oldbname);
memcpy (state->resolve.pargfid, args.oldgfid, 16);
state->resolve2.type = RESOLVE_MAY;
- state->resolve2.path = gf_strdup (args.newpath);
state->resolve2.bname = gf_strdup (args.newbname);
memcpy (state->resolve2.pargfid, args.newgfid, 16);