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 /xlators/nfs | |
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 'xlators/nfs')
-rw-r--r-- | xlators/nfs/server/src/nfs-fops.c | 5 | ||||
-rw-r--r-- | xlators/nfs/server/src/nfs.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c index 428c82a8fda..c6199d129eb 100644 --- a/xlators/nfs/server/src/nfs-fops.c +++ b/xlators/nfs/server/src/nfs-fops.c @@ -90,7 +90,7 @@ unsigned int cval = 1; int nfs_frame_getctr () { - int val = 0; + uint64_t val = 0; pthread_mutex_lock (&ctr); { @@ -132,7 +132,8 @@ nfs_create_frame (xlator_t *xl, nfs_user_t *nfu) gf_log (GF_NFS, GF_LOG_TRACE, "gid: %d", nfu->gids[x]); frame->root->groups[y] = nfu->gids[x]; } - frame->root->lk_owner = nfs_frame_getctr (); + + set_lk_owner_from_uint64 (&frame->root->lk_owner, nfs_frame_getctr ()); err: return frame; diff --git a/xlators/nfs/server/src/nfs.h b/xlators/nfs/server/src/nfs.h index a77e772a3e3..3113e32cc0b 100644 --- a/xlators/nfs/server/src/nfs.h +++ b/xlators/nfs/server/src/nfs.h @@ -45,6 +45,12 @@ #define GF_NFS_DVM_ON 1 #define GF_NFS_DVM_OFF 2 +/* This corresponds to the max 16 number of group IDs that are sent through an + * RPC request. Since NFS is the only one going to set this, we can be safe + * in keeping this size hardcoded. + */ +#define GF_REQUEST_MAXGROUPS 16 + /* Callback into a version-specific NFS protocol. * The return type is used by the nfs.c code to register the protocol. * with the RPC service. |