diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-10-07 17:43:33 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-10-07 18:45:08 -0700 |
commit | ebe40c5047e7501a5bd1747cb4d62277ae0db6e9 (patch) | |
tree | 16594d2cafc6ff9baceb5e1671b31bdce7502de9 /xlators/cluster/afr/src/afr-self-heal-entry.c | |
parent | ee944e86866a6556fd4dd98bcd6f1f58c323721f (diff) |
cluster/afr: Handle stack reset failures
When all the bricks go down in the middle of the self-heal, in AFR_STACK_RESET
afr_local_init will fail because all the bricks are down. So local will remain
NULL for the frame. This leads to crashes as this failure is not handled in
both entry and data self-heals.
Change-Id: I71a02f161f2c4dbfdc8bb7f2a6f32807191ed253
BUG: 1269470
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/12309
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index f3ddc0149da..434b0481f0d 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -545,6 +545,10 @@ afr_selfheal_entry_do_subvol (call_frame_t *frame, xlator_t *this, ret = afr_selfheal_entry_dirent (iter_frame, this, fd, entry->d_name); AFR_STACK_RESET (iter_frame); + if (iter_frame->local == NULL) { + ret = -ENOTCONN; + break; + } if (ret == -1) { /* gfid or type mismatch. */ |