diff options
author | Pavan Sondur <pavan@gluster.com> | 2010-08-06 05:31:45 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-06 04:09:07 -0700 |
commit | acdeed002d30209e0a058c2df0346d4f16c08994 (patch) | |
tree | 9c6acda8d92494952f4a80134303b9d2d1c3e1ac /xlators/cluster/afr/src/afr.h | |
parent | 453cb4bf0b70c876eb468def34054095cfd66359 (diff) |
add pump xlator and changes for replace-brick
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1235 (Bug for all pump/migrate commits)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 125f5c2a2f4..3fa987ee83d 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; @@ -576,6 +586,18 @@ typedef struct { #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); uint64_t |