diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2019-01-18 11:00:56 +0800 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-03-04 09:13:06 +0000 |
commit | 2b51b89f0f67ba1f7655cadb3fab9b4d3766faa6 (patch) | |
tree | 2e0122b1736d3afc09dbb7fa52d56781cd735eda /xlators/features/quota/src/quotad.c | |
parent | 16b4936696c8b602243513fbde0b20a1e8417432 (diff) |
quotad: fix passing GF_DATA_TYPE_STR_OLD dict data to v4 protocol
quotad prints many logs as,
[glusterfs3.h:752:dict_to_xdr] 0-dict: key 'trusted.glusterfs.quota.size' is not sent on wire [Invalid argument]
[glusterfs3.h:752:dict_to_xdr] 0-dict: key 'volume-uuid' is not sent on wire [Invalid argument]
For quota, there is a deamon named quotad which has a rpcsvc_program
quotad_aggregator_prog that only supports v3 right now.
Quotad has two actors (LOOKUP,GETLIMIT) that contains a dict in request,
quotad just decodes the dict by dict_unserialize, those dict dates's type
is GF_DATA_TYPE_STR_OLD, which type is not supported at glusterfs v4.
Change-Id: Ib649d7a2e3c68c32dc26bc0f88923a0ba967ebd7
Updates: bz#1596787
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Diffstat (limited to 'xlators/features/quota/src/quotad.c')
-rw-r--r-- | xlators/features/quota/src/quotad.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/xlators/features/quota/src/quotad.c b/xlators/features/quota/src/quotad.c index 11ef2b1189c..146ec749930 100644 --- a/xlators/features/quota/src/quotad.c +++ b/xlators/features/quota/src/quotad.c @@ -105,7 +105,8 @@ out: int qd_nameless_lookup(xlator_t *this, call_frame_t *frame, char *gfid, - dict_t *xdata, quotad_aggregator_lookup_cbk_t lookup_cbk) + dict_t *xdata, char *volume_uuid, + quotad_aggregator_lookup_cbk_t lookup_cbk) { gfs3_lookup_rsp rsp = { 0, @@ -116,7 +117,6 @@ qd_nameless_lookup(xlator_t *this, call_frame_t *frame, char *gfid, }; quotad_aggregator_state_t *state = NULL; xlator_t *subvol = NULL; - char *volume_uuid = NULL; state = frame->root->state; @@ -130,13 +130,6 @@ qd_nameless_lookup(xlator_t *this, call_frame_t *frame, char *gfid, memcpy(loc.gfid, gfid, 16); - ret = dict_get_strn(xdata, "volume-uuid", SLEN("volume-uuid"), - &volume_uuid); - if (ret < 0) { - op_errno = EINVAL; - goto out; - } - ret = dict_set_int8(xdata, QUOTA_READ_ONLY_KEY, 1); if (ret < 0) { gf_msg(this->name, GF_LOG_WARNING, ENOMEM, Q_MSG_ENOMEM, |