summaryrefslogtreecommitdiffstats
path: root/xlators/features/upcall
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@fb.com>2017-06-29 06:50:56 -0700
committerNiels de Vos <ndevos@redhat.com>2017-06-30 10:31:02 +0000
commit0be8e038d9bf90be94f3e3a7d6ea5bee88da9ecb (patch)
tree2f23f3b205a9bdd386488cc00a3d4b1f23b4a076 /xlators/features/upcall
parent50d72373fadf1174918e754e31bae3806aa4c214 (diff)
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 <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17650 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features/upcall')
-rw-r--r--xlators/features/upcall/src/upcall.h12
1 files changed, 6 insertions, 6 deletions
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