diff options
author | Amar Tumballi <amarts@redhat.com> | 2017-12-27 16:14:30 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2018-01-05 09:35:07 +0000 |
commit | 92430596d697381d5f49ff69eb24d9ff3e291da8 (patch) | |
tree | 2a393ce9a5032f207ca38464a2db9bfc9f3c7045 /rpc/xdr/src/glusterfs4-xdr.x | |
parent | 01caa839ebda29c2fe209c4767626f2f49ea3e71 (diff) |
dict: add more types for values
Added 2 more types which are present in gluster codebase, mainly
IATT and UUID.
Updates #203
Change-Id: Ib6d6d6aefb88c3494fbf93dcbe08d9979484968f
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'rpc/xdr/src/glusterfs4-xdr.x')
-rw-r--r-- | rpc/xdr/src/glusterfs4-xdr.x | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/rpc/xdr/src/glusterfs4-xdr.x b/rpc/xdr/src/glusterfs4-xdr.x index a4fc9b22850..7396b566fa7 100644 --- a/rpc/xdr/src/glusterfs4-xdr.x +++ b/rpc/xdr/src/glusterfs4-xdr.x @@ -12,10 +12,38 @@ %#include "rpc-pragmas.h" #endif %#include "compat.h" -%#include "rpc-common-xdr.h" %#include "glusterfs-fops.h" %#include "glusterfs3-xdr.h" + +union gfx_value switch (gf_dict_data_type_t type) { + case GF_DATA_TYPE_INT: + hyper value_int; + case GF_DATA_TYPE_UINT: + unsigned hyper value_uint; + case GF_DATA_TYPE_DOUBLE: + double value_dbl; + case GF_DATA_TYPE_STR: + opaque val_string<>; + case GF_DATA_TYPE_IATT: + gf_iatt iatt; + case GF_DATA_TYPE_GFUUID: + opaque uuid[20]; + case GF_DATA_TYPE_PTR: + opaque other<>; +}; + +struct gfx_dict_pair { + opaque key<>; + gfx_value value; +}; + +struct gfx_dict { + unsigned int count; + gfx_dict_pair pairs<>; +}; + +/* fops */ struct gfs3_fsetattr_req_v2 { opaque gfid[16]; hyper fd; |