summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient-internals.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-03-30 06:33:06 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-03 19:24:44 +0530
commit65bd768543c4de3d2ffd8d17efbd79e1e03666a4 (patch)
tree2b54d1915b972def5f4fe73ff78f70b49d4b089f /libglusterfsclient/src/libglusterfsclient-internals.h
parentab534d54e4e2e1eb921c7a3c98d44137471c7ac5 (diff)
libglusterfsclient - move lookup timeout related code to libgf_client_path_lookup
- this simplifies the resolution of path to inode, the apis which receive path as argument just need to call libgf_client_path_lookup for path->inode translation. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient-internals.h')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient-internals.h47
1 files changed, 46 insertions, 1 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient-internals.h b/libglusterfsclient/src/libglusterfsclient-internals.h
index f9e3fc4288a..a547da3039e 100755
--- a/libglusterfsclient/src/libglusterfsclient-internals.h
+++ b/libglusterfsclient/src/libglusterfsclient-internals.h
@@ -65,6 +65,52 @@ typedef struct {
}fop;
}libgf_client_local_t;
+typedef struct {
+ pthread_cond_t init_con_established;
+ pthread_mutex_t lock;
+ char complete;
+}libglusterfs_client_private_t;
+
+typedef struct {
+ pthread_mutex_t lock;
+ uint32_t previous_lookup_time;
+ uint32_t previous_stat_time;
+ struct stat stbuf;
+} libglusterfs_client_inode_ctx_t;
+
+typedef struct {
+ pthread_mutex_t lock;
+ off_t offset;
+ libglusterfs_client_ctx_t *ctx;
+} libglusterfs_client_fd_ctx_t;
+
+typedef struct libglusterfs_client_async_local {
+ void *cbk_data;
+ union {
+ struct {
+ fd_t *fd;
+ glusterfs_readv_cbk_t cbk;
+ }readv_cbk;
+
+ struct {
+ fd_t *fd;
+ glusterfs_write_cbk_t cbk;
+ }write_cbk;
+
+ struct {
+ fd_t *fd;
+ }close_cbk;
+
+ struct {
+ void *buf;
+ size_t size;
+ loc_t *loc;
+ char is_revalidate;
+ glusterfs_get_cbk_t cbk;
+ }lookup_cbk;
+ }fop;
+}libglusterfs_client_async_local_t;
+
#define LIBGF_STACK_WIND_AND_WAIT(frame, rfn, obj, fn, params ...) \
do { \
STACK_WIND (frame, rfn, obj, fn, params); \
@@ -79,7 +125,6 @@ typedef struct {
} while (0)
-
#define LIBGF_CLIENT_SIGNAL(signal_handler_list, signo, handler) \
do { \
libgf_client_signal_handler_t *libgf_handler = CALLOC (1, \