From 1a82b4539b69390dfb1a158c420385c7ad5d999f Mon Sep 17 00:00:00 2001 From: Pranith K Date: Fri, 17 Jun 2011 07:20:08 +0000 Subject: cluster/afr: Handle lookups when self-heal is off Signed-off-by: Pranith Kumar K Signed-off-by: Anand Avati BUG: 2586 (read child is set without checking the xattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2586 --- xlators/cluster/afr/src/afr.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'xlators/cluster/afr/src/afr.h') diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 3d21a26923d..973e8b58fed 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); -- cgit