From 0be8e038d9bf90be94f3e3a7d6ea5bee88da9ecb Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Thu, 29 Jun 2017 06:50:56 -0700 Subject: multiple: fix struct/typedef inconsistencies The most common pattern, both in our code and elsewhere, is this: struct _xyz { ... }; typedef struct _xyz xyz_t; These exceptions - especially call_frame/call_stack - have been slowing down code navigation for years. By converging on a single pattern, navigating from xyz_t in code to the actual definition of struct _xyz (i.e. without having to visit the typedef first) might even be automatable. Change-Id: I0e5dd1f51f98e000173c62ef4ddc5b21d9ec44ed Signed-off-by: Jeff Darcy Reviewed-on: https://review.gluster.org/17650 Smoke: Gluster Build System Tested-by: Jeff Darcy CentOS-regression: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Niels de Vos --- xlators/features/upcall/src/upcall.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xlators/features/upcall/src') diff --git a/xlators/features/upcall/src/upcall.h b/xlators/features/upcall/src/upcall.h index 159193f54e7..3e0d96cd001 100644 --- a/xlators/features/upcall/src/upcall.h +++ b/xlators/features/upcall/src/upcall.h @@ -44,7 +44,7 @@ upcall_local_wipe (__xl, __local); \ } while (0) -struct _upcall_private_t { +struct _upcall_private { gf_boolean_t cache_invalidation_enabled; int32_t cache_invalidation_timeout; struct list_head inode_ctx_list; @@ -55,9 +55,9 @@ struct _upcall_private_t { dict_t *xattrs; /* list of xattrs registered by clients for receiving invalidation */ }; -typedef struct _upcall_private_t upcall_private_t; +typedef struct _upcall_private upcall_private_t; -struct _upcall_client_t { +struct _upcall_client { struct list_head client_list; /* strdup to store client_uid, strdup. Free it explicitly */ char *client_uid; @@ -65,10 +65,10 @@ struct _upcall_client_t { /* the amount of time which client can cache this entry */ uint32_t expire_time_attr; }; -typedef struct _upcall_client_t upcall_client_t; +typedef struct _upcall_client upcall_client_t; /* Upcall entries are maintained in inode_ctx */ -struct _upcall_inode_ctx_t { +struct _upcall_inode_ctx { struct list_head inode_ctx_list; struct list_head client_list; pthread_mutex_t client_list_lock; /* mutex for clients list @@ -76,7 +76,7 @@ struct _upcall_inode_ctx_t { int destroy; uuid_t gfid; /* gfid of the entry */ }; -typedef struct _upcall_inode_ctx_t upcall_inode_ctx_t; +typedef struct _upcall_inode_ctx upcall_inode_ctx_t; struct upcall_local { /* XXX: need to check if we can store -- cgit