diff options
author | Pranith K <pranithk@gluster.com> | 2011-07-14 08:07:04 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-07-17 07:45:05 -0700 |
commit | bfc0e16e43815ab6d6e67f4bd26694ebd72b3360 (patch) | |
tree | 221eff40a09ce8e42ab6460bc9040d5b5f9f41fb /xlators/cluster/afr/src/pump.c | |
parent | 64b2a56ad0f8ddae9ece8696f7d50a3129c145a3 (diff) |
cluster/afr: Add fresh children along with read-child to inode context
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2840 (files not getting self-healed when the first child goes down)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2840
Diffstat (limited to 'xlators/cluster/afr/src/pump.c')
-rw-r--r-- | xlators/cluster/afr/src/pump.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index 48ce2c94568..300b0850443 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -1536,7 +1536,14 @@ pump_getxattr (call_frame_t *frame, xlator_t *this, return 0; } - read_child = afr_read_child (this, loc->inode); + local->fresh_children = GF_CALLOC (priv->child_count, + sizeof (*local->fresh_children), + gf_afr_mt_int32_t); + if (local->fresh_children) { + op_errno = ENOMEM; + goto out; + } + read_child = afr_inode_get_read_ctx (this, loc->inode, local->fresh_children); if (read_child >= 0) { call_child = read_child; |