summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-09-08 14:06:32 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-14 05:36:24 -0700
commit45f03a58a0fbfc1d5e647c764b10e37d0a9ebb26 (patch)
tree92b1848d39c867733c3c1876840b2b5f6a9c219e /xlators/cluster/afr/src/afr.h
parent3bea46c1f232a4480e57ac482f92f7673af7034f (diff)
Proactive self heal process implementation
Change-Id: I96db0d94566ceabf1649f890318363f738c06553 BUG: 2458 Reviewed-on: http://review.gluster.com/403 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index b9a11c486..92ccf607f 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -50,6 +50,12 @@ typedef int (*afr_post_remove_call_t) (call_frame_t *frame, xlator_t *this);
typedef int (*afr_lock_cbk_t) (call_frame_t *frame, xlator_t *this);
typedef enum {
+ AFR_POS_UNKNOWN,
+ AFR_POS_LOCAL,
+ AFR_POS_REMOTE
+} afr_child_pos_t;
+
+typedef enum {
AFR_INODE_SET_READ_CTX = 1,
AFR_INODE_RM_STALE_CHILDREN,
AFR_INODE_SET_OPENDIR_DONE,
@@ -75,6 +81,13 @@ typedef struct afr_inode_ctx_ {
int32_t *fresh_children;//increasing order of latency
} afr_inode_ctx_t;
+typedef struct afr_self_heald_ {
+ gf_boolean_t enabled;
+ gf_boolean_t pending;
+ gf_boolean_t inprogress;
+ afr_child_pos_t *pos;
+} afr_self_heald_t;
+
typedef struct _afr_private {
gf_lock_t lock; /* to guard access to child_count, etc */
unsigned int child_count; /* total number of children */
@@ -134,6 +147,7 @@ typedef struct _afr_private {
char vol_uuid[UUID_SIZE + 1];
int32_t *last_event;
+ afr_self_heald_t shd;
} afr_private_t;
typedef struct {
@@ -241,7 +255,6 @@ typedef struct {
call_frame_t *sh_frame;
} afr_self_heal_t;
-
typedef enum {
AFR_DATA_TRANSACTION, /* truncate, write, ... */
AFR_METADATA_TRANSACTION, /* chmod, chown, ... */
@@ -1001,4 +1014,6 @@ afr_open_only_data_self_heal (char *data_self_heal);
gf_boolean_t
afr_data_self_heal_enabled (char *data_self_heal);
+void
+afr_set_low_priority (call_frame_t *frame);
#endif /* __AFR_H__ */