From acdeed002d30209e0a058c2df0346d4f16c08994 Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Fri, 6 Aug 2010 05:31:45 +0000 Subject: add pump xlator and changes for replace-brick Signed-off-by: Pavan Vilas Sondur Signed-off-by: Anand V. Avati BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235 --- xlators/cluster/afr/src/afr.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'xlators/cluster/afr/src/afr.h') diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 125f5c2a2..3fa987ee8 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -32,6 +32,8 @@ #define AFR_XATTR_PREFIX "trusted.afr" +struct _pump_private; + typedef struct _afr_private { gf_lock_t lock; /* to guard access to child_count, etc */ unsigned int child_count; /* total number of children */ @@ -41,6 +43,10 @@ typedef struct _afr_private { xlator_t **children; + gf_lock_t root_inode_lk; + int first_lookup; + inode_t *root_inode; + unsigned char *child_up; char **pending_key; @@ -73,6 +79,9 @@ typedef struct _afr_private { uint64_t up_count; /* number of CHILD_UPs we have seen */ uint64_t down_count; /* number of CHILD_DOWNs we have seen */ + + struct _pump_private *pump_private; /* Set if we are loaded as pump */ + gf_boolean_t pump_loaded; } afr_private_t; typedef struct { @@ -205,6 +214,7 @@ typedef struct _afr_local { unsigned int success_count; unsigned int enoent_count; + unsigned int govinda_gOvinda; unsigned int read_child_index; @@ -575,6 +585,18 @@ typedef struct { /* have we tried all children? */ #define all_tried(i, count) ((i) == (count) - 1) +int +pump_command_reply (call_frame_t *frame, xlator_t *this); + +int32_t +afr_notify (xlator_t *this, int32_t event, + void *data, ...); + +void +afr_set_lk_owner (call_frame_t *frame, xlator_t *this); + +int pump_start (call_frame_t *frame, xlator_t *this); + int afr_fd_ctx_set (xlator_t *this, fd_t *fd); -- cgit