diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-04-02 08:30:32 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-02 21:07:53 +0530 |
commit | 1e7c9fa93716844e60d41811b8b79f8605a5044c (patch) | |
tree | 30f9bb2f177fb22dfe919dbdd5f1657e41bf1fc2 /xlators/cluster/afr/src/afr.h | |
parent | 9f2ef60274dae8b302d691ba8d266cd76dcd7c4b (diff) |
Defined afr_inode_ctx_t structure.
Notification of a split-brain situation, which was earlier signalled
by the mere presence of inode context is now signalled by
the 'split_brain' member in the structure.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 02c69597b0d..5db6e98092a 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -389,6 +389,23 @@ typedef struct _afr_local { afr_self_heal_t self_heal; } afr_local_t; + +typedef struct { + /* + split-brain situation in which afr + can do nothing + */ + gf_boolean_t split_brain; + + /* + subvolume from which all reads should + happen for this inode + */ + int read_child; + +} afr_inode_ctx_t; + + /* try alloc and if it fails, goto label */ #define ALLOC_OR_GOTO(var, type, label) do { \ var = CALLOC (sizeof (type), 1); \ |