diff options
author | Amar Tumballi <amar@gluster.com> | 2012-01-17 05:28:51 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2012-01-24 20:14:17 -0800 |
commit | b02afc6d008f9959db28244eb2b9dd3b9ef92393 (patch) | |
tree | c0bad790fb34f8ab2747b480d334cf9af75c5514 /rpc/xdr/src/glusterfs3.h | |
parent | 0694749c3e5039be327110a64dd66619b5d9121c (diff) |
core: change lk-owner as a 1k buffer
so, NLM can send the lk-owner field directly to the locks translators,
while doing the same effort, also enabled sending maximum of 500 aux gid
over protocol.
Change-Id: I87c2514392748416f7ffe21d5154faad2e413969
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 767229
Reviewed-on: http://review.gluster.com/779
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'rpc/xdr/src/glusterfs3.h')
-rw-r--r-- | rpc/xdr/src/glusterfs3.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rpc/xdr/src/glusterfs3.h b/rpc/xdr/src/glusterfs3.h index ba64a0b4508..82a9e200189 100644 --- a/rpc/xdr/src/glusterfs3.h +++ b/rpc/xdr/src/glusterfs3.h @@ -197,7 +197,11 @@ gf_proto_flock_to_flock (struct gf_proto_flock *gf_proto_flock, struct gf_flock gf_flock->l_start = gf_proto_flock->start; gf_flock->l_len = gf_proto_flock->len; gf_flock->l_pid = gf_proto_flock->pid; - gf_flock->l_owner = gf_proto_flock->owner; + gf_flock->l_owner.len = gf_proto_flock->lk_owner.lk_owner_len; + if (gf_flock->l_owner.len && + (gf_flock->l_owner.len < GF_MAX_LOCK_OWNER_LEN)) + memcpy (gf_flock->l_owner.data, gf_proto_flock->lk_owner.lk_owner_val, + gf_flock->l_owner.len); } @@ -212,7 +216,9 @@ gf_proto_flock_from_flock (struct gf_proto_flock *gf_proto_flock, struct gf_floc gf_proto_flock->start = (gf_flock->l_start); gf_proto_flock->len = (gf_flock->l_len); gf_proto_flock->pid = (gf_flock->l_pid); - gf_proto_flock->owner = (gf_flock->l_owner); + gf_proto_flock->lk_owner.lk_owner_len = gf_flock->l_owner.len; + if (gf_flock->l_owner.len) + gf_proto_flock->lk_owner.lk_owner_val = gf_flock->l_owner.data; } static inline void |