From b02afc6d008f9959db28244eb2b9dd3b9ef92393 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 17 Jan 2012 05:28:51 +0530 Subject: 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 BUG: 767229 Reviewed-on: http://review.gluster.com/779 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/glusterfs.h | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'libglusterfs/src/glusterfs.h') diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 903d2324a..2f68ab741 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -45,7 +45,6 @@ #include "list.h" #include "logging.h" - #define GF_YES 1 #define GF_NO 0 @@ -114,6 +113,12 @@ /* TODO: Should we use PATH-MAX? On some systems it may save space */ #define ZR_PATH_MAX 4096 +/* GlusterFS's maximum supported Auxilary GIDs */ +/* TODO: Keeping it to 200, so that we can fit in 2KB buffer for auth data + * in RPC server code, if there is ever need for having more aux-gids, then + * we have to add aux-gid in payload of actors */ +#define GF_MAX_AUX_GROUPS 200 + /* NOTE: add members ONLY at the end (just before _MAXVALUE) */ typedef enum { GF_FOP_NULL = 0, @@ -177,15 +182,6 @@ typedef enum { GF_OP_TYPE_MAX, } gf_op_type_t; -struct gf_flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; - uint64_t l_owner; -}; - /* NOTE: all the miscellaneous flags used by GlusterFS should be listed here */ typedef enum { GF_LK_GETLK = 0, @@ -385,6 +381,19 @@ typedef enum { GF_EVENT_MAXVAL, } glusterfs_event_t; +/* gf_lkowner_t is defined in lkowner.h */ +#include "lkowner.h" + +struct gf_flock { + short l_type; + short l_whence; + off_t l_start; + off_t l_len; + pid_t l_pid; + gf_lkowner_t l_owner; +}; + + extern char *glusterfs_strevent (glusterfs_event_t ev); #define GF_MUST_CHECK __attribute__((warn_unused_result)) -- cgit