summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.h
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2013-08-21 14:11:38 -0400
committerAnand Avati <avati@redhat.com>2013-10-31 09:32:50 -0700
commit3108d4529d57690f58027da61ac5e56a0987ed57 (patch)
treeed2eb16d54fdc4dcbdfe15eb2bff90597658339a /xlators/protocol/server/src/server.h
parentc47408e896c9bcaf21e7f8956bdae85633f873e0 (diff)
client_t: phase 2, refactor server_ctx and locks_ctx out
remove server_ctx and locks_ctx from client_ctx directly and store as into discrete entities in the scratch_ctx hooking up dump will be in phase 3 BUG: 849630 Change-Id: I94cea328326db236cdfdf306cb381e4d58f58d4c Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5678 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.h')
-rw-r--r--xlators/protocol/server/src/server.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h
index 3238f6f40e2..43e84921c8a 100644
--- a/xlators/protocol/server/src/server.h
+++ b/xlators/protocol/server/src/server.h
@@ -13,6 +13,7 @@
#include <pthread.h>
+#include "fd.h"
#include "rpcsvc.h"
#include "fd.h"
@@ -20,6 +21,7 @@
#include "server-mem-types.h"
#include "glusterfs3.h"
#include "timer.h"
+#include "client_t.h"
#define DEFAULT_BLOCK_SIZE 4194304 /* 4MB */
#define DEFAULT_VOLUME_FILE_PATH CONFDIR "/glusterfs.vol"
@@ -92,11 +94,10 @@ int
resolve_and_resume (call_frame_t *frame, server_resume_fn_t fn);
struct _server_state {
- struct _client_t *client;
- rpc_transport_t *xprt;
- inode_table_t *itable;
+ rpc_transport_t *xprt;
+ inode_table_t *itable;
- server_resume_fn_t resume_fn;
+ server_resume_fn_t resume_fn;
loc_t loc;
loc_t loc2;
@@ -132,7 +133,7 @@ struct _server_state {
int mask;
char is_revalidate;
dict_t *dict;
- struct gf_flock flock;
+ struct gf_flock flock;
const char *volume;
dir_entry_t *entry;
@@ -140,10 +141,20 @@ struct _server_state {
mode_t umask;
};
+
extern struct rpcsvc_program gluster_handshake_prog;
extern struct rpcsvc_program glusterfs3_3_fop_prog;
extern struct rpcsvc_program gluster_ping_prog;
+
+typedef struct _server_ctx {
+ gf_lock_t fdtable_lock;
+ fdtable_t *fdtable;
+ struct _gf_timer *grace_timer;
+ uint32_t lk_version;
+} server_ctx_t;
+
+
int
server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg,
struct iovec *payload, int payloadcount,