summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-03 11:46:21 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-04 01:45:41 -0700
commit2c400f60cad3ac0b9dbf1be06b48675d40fcc824 (patch)
treed2593d77e0e24a9ffc63f247a2e737c70bde2571 /rpc
parent64443fa783c9c43a597440164b35fd8131b7f4d3 (diff)
gfid: protocol/xdr changes to handle gfid based fops.
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'rpc')
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.c152
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.h63
2 files changed, 214 insertions, 1 deletions
diff --git a/rpc/xdr/src/glusterfs3-xdr.c b/rpc/xdr/src/glusterfs3-xdr.c
index f18a25358..d9453c44a 100644
--- a/rpc/xdr/src/glusterfs3-xdr.c
+++ b/rpc/xdr/src/glusterfs3-xdr.c
@@ -24,7 +24,6 @@
*/
#include "glusterfs3-xdr.h"
-#include "iatt.h"
bool_t
xdr_gf_statfs (XDR *xdrs, gf_statfs *objp)
@@ -78,6 +77,9 @@ xdr_gf_iatt (XDR *xdrs, gf_iatt *objp)
register int32_t *buf;
if (xdrs->x_op == XDR_ENCODE) {
+ if (!xdr_vector (xdrs, (char *)objp->ia_gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ia_ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ia_gen))
@@ -133,6 +135,9 @@ xdr_gf_iatt (XDR *xdrs, gf_iatt *objp)
}
return TRUE;
} else if (xdrs->x_op == XDR_DECODE) {
+ if (!xdr_vector (xdrs, (char *)objp->ia_gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ia_ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ia_gen))
@@ -189,6 +194,10 @@ xdr_gf_iatt (XDR *xdrs, gf_iatt *objp)
return TRUE;
}
+ if (!xdr_vector (xdrs, (char *)objp->ia_gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
+
if (!xdr_u_quad_t (xdrs, &objp->ia_ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ia_gen))
@@ -232,6 +241,9 @@ xdr_gfs3_stat_req (XDR *xdrs, gfs3_stat_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -262,6 +274,9 @@ xdr_gfs3_readlink_req (XDR *xdrs, gfs3_readlink_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -296,6 +311,9 @@ xdr_gfs3_mknod_req (XDR *xdrs, gfs3_mknod_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pargfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->par))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -308,6 +326,9 @@ xdr_gfs3_mknod_req (XDR *xdrs, gfs3_mknod_req *objp)
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))
+ return FALSE;
return TRUE;
}
@@ -336,6 +357,9 @@ xdr_gfs3_mkdir_req (XDR *xdrs, gfs3_mkdir_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pargfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->par))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -346,6 +370,9 @@ xdr_gfs3_mkdir_req (XDR *xdrs, gfs3_mkdir_req *objp)
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))
+ return FALSE;
return TRUE;
}
@@ -374,6 +401,9 @@ xdr_gfs3_unlink_req (XDR *xdrs, gfs3_unlink_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pargfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->par))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -408,6 +438,9 @@ xdr_gfs3_rmdir_req (XDR *xdrs, gfs3_rmdir_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pargfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->par))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -442,6 +475,9 @@ xdr_gfs3_symlink_req (XDR *xdrs, gfs3_symlink_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pargfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->par))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -452,6 +488,9 @@ xdr_gfs3_symlink_req (XDR *xdrs, gfs3_symlink_req *objp)
return FALSE;
if (!xdr_string (xdrs, &objp->linkname, ~0))
return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val,
+ (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
return TRUE;
}
@@ -480,6 +519,12 @@ xdr_gfs3_rename_req (XDR *xdrs, gfs3_rename_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->oldgfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->newgfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->oldpar))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->oldgen))
@@ -528,6 +573,12 @@ xdr_gfs3_link_req (XDR *xdrs, gfs3_link_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->oldgfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->newgfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->oldino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->oldgen))
@@ -570,6 +621,9 @@ xdr_gfs3_truncate_req (XDR *xdrs, gfs3_truncate_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -604,6 +658,9 @@ xdr_gfs3_open_req (XDR *xdrs, gfs3_open_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -638,6 +695,9 @@ xdr_gfs3_read_req (XDR *xdrs, gfs3_read_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -675,6 +735,12 @@ xdr_gfs3_lookup_req (XDR *xdrs, gfs3_lookup_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pargfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->par))
@@ -719,6 +785,9 @@ xdr_gfs3_write_req (XDR *xdrs, gfs3_write_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -755,6 +824,9 @@ xdr_gfs3_statfs_req (XDR *xdrs, gfs3_statfs_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -785,6 +857,9 @@ xdr_gfs3_lk_req (XDR *xdrs, gfs3_lk_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -821,6 +896,9 @@ xdr_gfs3_inodelk_req (XDR *xdrs, gfs3_inodelk_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -844,6 +922,9 @@ xdr_gfs3_finodelk_req (XDR *xdrs, gfs3_finodelk_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -867,6 +948,9 @@ xdr_gfs3_flush_req (XDR *xdrs, gfs3_flush_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -882,6 +966,9 @@ xdr_gfs3_fsync_req (XDR *xdrs, gfs3_fsync_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -916,6 +1003,9 @@ xdr_gfs3_setxattr_req (XDR *xdrs, gfs3_setxattr_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -935,6 +1025,9 @@ xdr_gfs3_fsetxattr_req (XDR *xdrs, gfs3_fsetxattr_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -954,6 +1047,9 @@ xdr_gfs3_xattrop_req (XDR *xdrs, gfs3_xattrop_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -988,6 +1084,9 @@ xdr_gfs3_fxattrop_req (XDR *xdrs, gfs3_fxattrop_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1022,6 +1121,9 @@ xdr_gfs3_getxattr_req (XDR *xdrs, gfs3_getxattr_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1056,6 +1158,9 @@ xdr_gfs3_fgetxattr_req (XDR *xdrs, gfs3_fgetxattr_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1090,6 +1195,9 @@ xdr_gfs3_removexattr_req (XDR *xdrs, gfs3_removexattr_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1107,6 +1215,9 @@ xdr_gfs3_opendir_req (XDR *xdrs, gfs3_opendir_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1137,6 +1248,9 @@ xdr_gfs3_fsyncdir_req (XDR *xdrs, gfs3_fsyncdir_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1154,6 +1268,9 @@ xdr_gfs3_readdir_req (XDR *xdrs, gfs3_readdir_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1173,6 +1290,9 @@ xdr_gfs3_readdirp_req (XDR *xdrs, gfs3_readdirp_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1218,6 +1338,9 @@ xdr_gfs3_access_req (XDR *xdrs, gfs3_access_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1235,6 +1358,9 @@ xdr_gfs3_create_req (XDR *xdrs, gfs3_create_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pargfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->par))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1247,6 +1373,9 @@ xdr_gfs3_create_req (XDR *xdrs, gfs3_create_req *objp)
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))
+ return FALSE;
return TRUE;
}
@@ -1277,6 +1406,9 @@ xdr_gfs3_ftruncate_req (XDR *xdrs, gfs3_ftruncate_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1311,6 +1443,9 @@ xdr_gfs3_fstat_req (XDR *xdrs, gfs3_fstat_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1341,6 +1476,9 @@ xdr_gfs3_entrylk_req (XDR *xdrs, gfs3_entrylk_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1366,6 +1504,9 @@ xdr_gfs3_fentrylk_req (XDR *xdrs, gfs3_fentrylk_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1392,6 +1533,9 @@ xdr_gfs3_setattr_req (XDR *xdrs, gfs3_setattr_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1648,6 +1792,9 @@ xdr_gfs3_releasedir_req (XDR *xdrs, gfs3_releasedir_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
@@ -1663,6 +1810,9 @@ xdr_gfs3_release_req (XDR *xdrs, gfs3_release_req *objp)
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->gfid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->ino))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->gen))
diff --git a/rpc/xdr/src/glusterfs3-xdr.h b/rpc/xdr/src/glusterfs3-xdr.h
index 62866bf45..bcd293da6 100644
--- a/rpc/xdr/src/glusterfs3-xdr.h
+++ b/rpc/xdr/src/glusterfs3-xdr.h
@@ -241,6 +241,7 @@ gf_flock_from_flock (struct gf_flock *gf_flock, struct flock *flock)
}
struct gf_iatt {
+ u_char ia_gfid[16];
u_quad_t ia_ino;
u_quad_t ia_gen;
u_quad_t ia_dev;
@@ -268,6 +269,7 @@ gf_stat_to_iatt (struct gf_iatt *gf_stat, struct iatt *iatt)
if (!iatt || !gf_stat)
return;
+ memcpy (iatt->ia_gfid, gf_stat->ia_gfid, 16);
iatt->ia_ino = gf_stat->ia_ino ;
iatt->ia_gen = gf_stat->ia_gen ;
iatt->ia_dev = gf_stat->ia_dev ;
@@ -295,6 +297,7 @@ gf_stat_from_iatt (struct gf_iatt *gf_stat, struct iatt *iatt)
if (!iatt || !gf_stat)
return;
+ memcpy (gf_stat->ia_gfid, iatt->ia_gfid, 16);
gf_stat->ia_ino = iatt->ia_ino ;
gf_stat->ia_gen = iatt->ia_gen ;
gf_stat->ia_dev = iatt->ia_dev ;
@@ -319,6 +322,7 @@ gf_stat_from_iatt (struct gf_iatt *gf_stat, struct iatt *iatt)
struct gfs3_stat_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
char *path;
@@ -335,6 +339,7 @@ typedef struct gfs3_stat_rsp gfs3_stat_rsp;
struct gfs3_readlink_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int size;
@@ -353,12 +358,18 @@ typedef struct gfs3_readlink_rsp gfs3_readlink_rsp;
struct gfs3_mknod_req {
u_quad_t gfs_id;
+ u_char pargfid[16];
u_quad_t par;
u_quad_t gen;
u_quad_t dev;
u_int mode;
char *path;
char *bname;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
+
};
typedef struct gfs3_mknod_req gfs3_mknod_req;
@@ -374,11 +385,16 @@ typedef struct gfs3_mknod_rsp gfs3_mknod_rsp;
struct gfs3_mkdir_req {
u_quad_t gfs_id;
+ u_char pargfid[16];
u_quad_t par;
u_quad_t gen;
u_int mode;
char *path;
char *bname;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
};
typedef struct gfs3_mkdir_req gfs3_mkdir_req;
@@ -394,6 +410,7 @@ typedef struct gfs3_mkdir_rsp gfs3_mkdir_rsp;
struct gfs3_unlink_req {
u_quad_t gfs_id;
+ u_char pargfid[16];
u_quad_t par;
u_quad_t gen;
char *path;
@@ -412,6 +429,7 @@ typedef struct gfs3_unlink_rsp gfs3_unlink_rsp;
struct gfs3_rmdir_req {
u_quad_t gfs_id;
+ u_char pargfid[16];
u_quad_t par;
u_quad_t gen;
char *path;
@@ -430,11 +448,16 @@ typedef struct gfs3_rmdir_rsp gfs3_rmdir_rsp;
struct gfs3_symlink_req {
u_quad_t gfs_id;
+ u_char pargfid[16];
u_quad_t par;
u_quad_t gen;
char *path;
char *bname;
char *linkname;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
};
typedef struct gfs3_symlink_req gfs3_symlink_req;
@@ -450,6 +473,8 @@ typedef struct gfs3_symlink_rsp gfs3_symlink_rsp;
struct gfs3_rename_req {
u_quad_t gfs_id;
+ u_char oldgfid[16];
+ u_char newgfid[16];
u_quad_t oldpar;
u_quad_t oldgen;
u_quad_t newpar;
@@ -475,6 +500,8 @@ typedef struct gfs3_rename_rsp gfs3_rename_rsp;
struct gfs3_link_req {
u_quad_t gfs_id;
+ u_char oldgfid[16];
+ u_char newgfid[16];
u_quad_t oldino;
u_quad_t oldgen;
u_quad_t newpar;
@@ -497,6 +524,7 @@ typedef struct gfs3_link_rsp gfs3_link_rsp;
struct gfs3_truncate_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_quad_t offset;
@@ -515,6 +543,7 @@ typedef struct gfs3_truncate_rsp gfs3_truncate_rsp;
struct gfs3_open_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int flags;
@@ -533,6 +562,7 @@ typedef struct gfs3_open_rsp gfs3_open_rsp;
struct gfs3_read_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -552,6 +582,8 @@ typedef struct gfs3_read_rsp gfs3_read_rsp;
struct gfs3_lookup_req {
u_quad_t gfs_id;
+ u_char gfid[16];
+ u_char pargfid[16];
u_quad_t ino;
u_quad_t par;
u_quad_t gen;
@@ -580,6 +612,7 @@ typedef struct gfs3_lookup_rsp gfs3_lookup_rsp;
struct gfs3_write_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -599,6 +632,7 @@ typedef struct gfs3_write_rsp gfs3_write_rsp;
struct gfs3_statfs_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
char *path;
@@ -615,6 +649,7 @@ typedef struct gfs3_statfs_rsp gfs3_statfs_rsp;
struct gfs3_lk_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -634,6 +669,7 @@ typedef struct gfs3_lk_rsp gfs3_lk_rsp;
struct gfs3_inodelk_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int cmd;
@@ -646,6 +682,7 @@ typedef struct gfs3_inodelk_req gfs3_inodelk_req;
struct gfs3_finodelk_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -658,6 +695,7 @@ typedef struct gfs3_finodelk_req gfs3_finodelk_req;
struct gfs3_flush_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -666,6 +704,7 @@ typedef struct gfs3_flush_req gfs3_flush_req;
struct gfs3_fsync_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -684,6 +723,7 @@ typedef struct gfs3_fsync_rsp gfs3_fsync_rsp;
struct gfs3_setxattr_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int flags;
@@ -697,6 +737,7 @@ typedef struct gfs3_setxattr_req gfs3_setxattr_req;
struct gfs3_fsetxattr_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -710,6 +751,7 @@ typedef struct gfs3_fsetxattr_req gfs3_fsetxattr_req;
struct gfs3_xattrop_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int flags;
@@ -734,6 +776,7 @@ typedef struct gfs3_xattrop_rsp gfs3_xattrop_rsp;
struct gfs3_fxattrop_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -758,6 +801,7 @@ typedef struct gfs3_fxattrop_rsp gfs3_fxattrop_rsp;
struct gfs3_getxattr_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int namelen;
@@ -779,6 +823,7 @@ typedef struct gfs3_getxattr_rsp gfs3_getxattr_rsp;
struct gfs3_fgetxattr_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -800,6 +845,7 @@ typedef struct gfs3_fgetxattr_rsp gfs3_fgetxattr_rsp;
struct gfs3_removexattr_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
char *path;
@@ -809,6 +855,7 @@ typedef struct gfs3_removexattr_req gfs3_removexattr_req;
struct gfs3_opendir_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
char *path;
@@ -825,6 +872,7 @@ typedef struct gfs3_opendir_rsp gfs3_opendir_rsp;
struct gfs3_fsyncdir_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -834,6 +882,7 @@ typedef struct gfs3_fsyncdir_req gfs3_fsyncdir_req;
struct gfs3_readdir_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -844,6 +893,7 @@ typedef struct gfs3_readdir_req gfs3_readdir_req;
struct gfs3_readdirp_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -874,6 +924,7 @@ typedef struct gf_setvolume_rsp gf_setvolume_rsp;
struct gfs3_access_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int mask;
@@ -883,12 +934,17 @@ typedef struct gfs3_access_req gfs3_access_req;
struct gfs3_create_req {
u_quad_t gfs_id;
+ u_char pargfid[16];
u_quad_t par;
u_quad_t gen;
u_int flags;
u_int mode;
char *path;
char *bname;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
};
typedef struct gfs3_create_req gfs3_create_req;
@@ -905,6 +961,7 @@ typedef struct gfs3_create_rsp gfs3_create_rsp;
struct gfs3_ftruncate_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -923,6 +980,7 @@ typedef struct gfs3_ftruncate_rsp gfs3_ftruncate_rsp;
struct gfs3_fstat_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -939,6 +997,7 @@ typedef struct gfs3_fstat_rsp gfs3_fstat_rsp;
struct gfs3_entrylk_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
u_int cmd;
@@ -952,6 +1011,7 @@ typedef struct gfs3_entrylk_req gfs3_entrylk_req;
struct gfs3_fentrylk_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -966,6 +1026,7 @@ typedef struct gfs3_fentrylk_req gfs3_fentrylk_req;
struct gfs3_setattr_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
struct gf_iatt stbuf;
@@ -1062,6 +1123,7 @@ typedef struct gf_notify_rsp gf_notify_rsp;
struct gfs3_releasedir_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;
@@ -1070,6 +1132,7 @@ typedef struct gfs3_releasedir_req gfs3_releasedir_req;
struct gfs3_release_req {
u_quad_t gfs_id;
+ u_char gfid[16];
u_quad_t ino;
u_quad_t gen;
quad_t fd;