summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2011-06-17 07:20:08 +0000
committerAnand Avati <avati@gluster.com>2011-07-12 05:37:45 -0700
commit1a82b4539b69390dfb1a158c420385c7ad5d999f (patch)
treefc1145204199e48ff7f1eb3a52be700eabb4d8bf /xlators/cluster/afr/src/afr.h
parent9866f23b9b0ceb8be876600be9832987b8646540 (diff)
cluster/afr: Handle lookups when self-heal is off
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2586 (read child is set without checking the xattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2586
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 3d21a2692..973e8b58f 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -137,6 +137,10 @@ typedef struct {
/* array of xattr's, one for each child */
dict_t **xattr;
+ /* array containing if the lookups succeeded in the order of response
+ */
+ int32_t *child_success;
+ int success_count;
/* array of errno's, one for each child */
int *child_errno;
@@ -340,14 +344,17 @@ typedef struct _afr_local {
struct {
inode_t *inode;
struct iatt buf;
- struct iatt read_child_buf;
struct iatt postparent;
ino_t ino;
uint64_t gen;
ino_t parent_ino;
- dict_t *xattr;
dict_t **xattrs;
- gf_boolean_t is_revalidate;
+ dict_t *xattr;
+ struct iatt *postparents;
+ struct iatt *bufs;
+ int32_t read_child;
+ int32_t *child_success;//in the order of response
+ int32_t *sources;
} lookup;
struct {
@@ -735,6 +742,9 @@ afr_build_parent_loc (loc_t *parent, loc_t *child);
int
afr_up_children_count (int child_count, unsigned char *child_up);
+gf_boolean_t
+afr_is_fresh_lookup (loc_t *loc, xlator_t *this);
+
void
afr_update_loc_gfids (loc_t *loc, struct iatt *buf, struct iatt *postparent);