diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2014-11-11 18:45:01 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-12-05 03:39:07 -0800 |
commit | 36236eecef55c710e1f11ba4a04fe01da67cab6a (patch) | |
tree | 7e38bc7816ee8a2ae5de1db46b6691a58b17fc10 /xlators/cluster/ec/src/ec-dir-write.c | |
parent | 318df520945a5d618f45a3a3f680e2b39a278375 (diff) |
ec: Fix return errors when not enough bricks
Changes introduced by this patch:
* Fix an incorrect error propagation when the state of the life
cycle of a fop returns an error.
* Fix incorrect unlocking of failed locks.
* Return ENOTCONN if there aren't enough bricks online.
* In readdir(p) check that the fd has been successfully open by
a previous opendir.
Change-Id: Ib44f25a1297849ebcbab839332f3b6359f275ebe
BUG: 1162805
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/9098
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-dir-write.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-dir-write.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-dir-write.c b/xlators/cluster/ec/src/ec-dir-write.c index 2b1064a98f0..91467ae26e7 100644 --- a/xlators/cluster/ec/src/ec-dir-write.c +++ b/xlators/cluster/ec/src/ec-dir-write.c @@ -278,6 +278,7 @@ int32_t ec_manager_create(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_DISPATCH: case -EC_STATE_PREPARE_ANSWER: @@ -560,6 +561,7 @@ int32_t ec_manager_link(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_GET_SIZE_AND_VERSION: case -EC_STATE_DISPATCH: @@ -839,6 +841,7 @@ int32_t ec_manager_mkdir(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_DISPATCH: case -EC_STATE_PREPARE_ANSWER: @@ -1139,6 +1142,7 @@ int32_t ec_manager_mknod(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_DISPATCH: case -EC_STATE_PREPARE_ANSWER: @@ -1403,6 +1407,7 @@ int32_t ec_manager_rename(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_GET_SIZE_AND_VERSION: case -EC_STATE_DISPATCH: @@ -1642,6 +1647,7 @@ int32_t ec_manager_rmdir(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_DISPATCH: case -EC_STATE_PREPARE_ANSWER: @@ -1898,6 +1904,7 @@ int32_t ec_manager_symlink(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_DISPATCH: case -EC_STATE_PREPARE_ANSWER: @@ -2146,6 +2153,7 @@ int32_t ec_manager_unlink(ec_fop_data_t * fop, int32_t state) return EC_STATE_LOCK_REUSE; + case -EC_STATE_INIT: case -EC_STATE_LOCK: case -EC_STATE_GET_SIZE_AND_VERSION: case -EC_STATE_DISPATCH: |