summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-12-02 23:19:46 +0200
committerAmar Tumballi <amarts@redhat.com>2018-12-14 04:53:36 +0000
commite3d01793a3ef1307240fdc7d7f0d12be1488b921 (patch)
tree8c6b6d33fb7df70b17ba7469972e9f633a0158c4 /libglusterfs
parent2421453bf38469a8c0861f205bdee37e771aa39f (diff)
Multiple posix related files: several modifications
Just looked at posix.c and related code and performed some changes and cleanups. The only important one is #3 below, but surely the others (#2 and #4) need careful review. Changes to other files are as they were related to code paths in posix.c. I'll send a separate patch for other posix related files. Main changes: 1. Proper initializtion for parameters, where it made sense. 2. Logged outside the lock in several places. 3. Moved from CALLOC to MALLOC where it made sense. 4. Aligned structures. 5. moved dictionary functions to use _sizen where possible. (dict_get() -> dict_get_sizen() for example) Compile-tested only! Change-Id: Ia84699fb495e06d095339c91c1ba770d1393bb6c updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/call-stub.c2
-rw-r--r--libglusterfs/src/glusterfs/call-stub.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 886dfa52ccc..3c7c7748c99 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -16,7 +16,7 @@
#include "glusterfs/libglusterfs-messages.h"
static call_stub_t *
-stub_new(call_frame_t *frame, char wind, glusterfs_fop_t fop)
+stub_new(call_frame_t *frame, const char wind, const glusterfs_fop_t fop)
{
call_stub_t *new = NULL;
diff --git a/libglusterfs/src/glusterfs/call-stub.h b/libglusterfs/src/glusterfs/call-stub.h
index c01c935e73d..8237ea459bf 100644
--- a/libglusterfs/src/glusterfs/call-stub.h
+++ b/libglusterfs/src/glusterfs/call-stub.h
@@ -19,15 +19,11 @@
typedef struct _call_stub {
struct list_head list;
- char wind;
call_frame_t *frame;
- glusterfs_fop_t fop;
- gf_boolean_t poison;
struct mem_pool *stub_mem_pool; /* pointer to stub mempool in ctx_t */
uint32_t jnl_meta_len;
uint32_t jnl_data_len;
void (*serialize)(struct _call_stub *, char *, char *);
-
union {
fop_lookup_t lookup;
fop_stat_t stat;
@@ -139,7 +135,9 @@ typedef struct _call_stub {
fop_namelink_cbk_t namelink;
fop_copy_file_range_cbk_t copy_file_range;
} fn_cbk;
-
+ glusterfs_fop_t fop;
+ gf_boolean_t poison;
+ char wind;
default_args_t args;
default_args_cbk_t args_cbk;
} call_stub_t;