summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-07-12 18:37:43 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-07-21 23:28:19 -0700
commit64344ba16ad996d5bf517c2ca983cc730e1c7117 (patch)
treee7b402d657b1c5365ec05abbb952f7424b6c5f48 /xlators/cluster/ec
parentb8a079b17f5aeb659ca35b9c7ec4b0ac7dc80406 (diff)
cluster/ec: Propogate correct errno in case of failures
- Also remove internal-fop setting in create/mknod etc xattrs. Rebalance was failing because ec was giving EIO when lock acquiring fails as the file/dir doesn't exist. Posix_create/mknod are not setting config xattr because internal-fop key is present in dict and setxattr for this fails leading to failure in setting rest of xattrs. >Change-Id: Ifb429c8db9df7cd51e4f8ce53fdf1e1b975c9993 >BUG: 1242254 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/11639 >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> BUG: 1243654 Change-Id: Iedb90d6a7d980fb88d6dfa6a6c978a165a4be3fd Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11688 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/ec')
-rw-r--r--xlators/cluster/ec/src/ec-locks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-locks.c b/xlators/cluster/ec/src/ec-locks.c
index dd79514359f..9c41e119834 100644
--- a/xlators/cluster/ec/src/ec-locks.c
+++ b/xlators/cluster/ec/src/ec-locks.c
@@ -77,7 +77,10 @@ int32_t ec_lock_check(ec_fop_data_t *fop, uintptr_t *mask)
}
}
} else {
- error = EIO;
+ if (fop->answer && fop->answer->op_ret < 0)
+ error = fop->answer->op_errno;
+ else
+ error = EIO;
}
}