summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-04-03 05:34:10 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-03 18:13:05 +0530
commitd3d7245970189629937f6330a6d946f5fbb454af (patch)
treeee1f9ccdc619761caa99ce29934ee46b2671f03e /xlators/cluster/afr/src/afr.h
parent75c70231fe7e13a68239dac889568d243a79a75e (diff)
Made afr inode context a 64-bit packed value instead of a 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.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index a447b74f4..ac1a5f6ad 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -394,22 +394,6 @@ typedef struct _afr_local {
} 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); \
@@ -430,6 +414,12 @@ typedef struct {
/* have we tried all children? */
#define all_tried(i, count) ((i) == (count) - 1)
+uint64_t
+afr_read_child (xlator_t *this, inode_t *inode);
+
+void
+afr_set_read_child (xlator_t *this, inode_t *inode, int32_t read_child);
+
void
afr_build_parent_loc (loc_t *parent, loc_t *child);