summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-data.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-10-07 17:43:33 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-10-07 22:01:09 -0700
commit1b1f063371a66748101ba90bafe08317dee50c4d (patch)
treeef155271e90b5cc5c9b936788a757a358b160ec9 /xlators/cluster/afr/src/afr-self-heal-data.c
parent25e581d42e6e064718bb902d8819ed458d333a4d (diff)
cluster/afr: Handle stack reset failures
Backport of http://review.gluster.com/12309 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: 1269501 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12310 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-data.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 3245cfd6e9c..279f2faaaaf 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -369,6 +369,10 @@ afr_selfheal_data_do (call_frame_t *frame, xlator_t *this, fd_t *fd,
goto out;
AFR_STACK_RESET (iter_frame);
+ if (iter_frame->local == NULL) {
+ ret = -ENOTCONN;
+ goto out;
+ }
}
afr_selfheal_data_restore_time (frame, this, fd->inode, source,