diff options
| author | Xavier Hernandez <xhernandez@datalab.es> | 2014-11-11 18:45:01 +0100 | 
|---|---|---|
| committer | Raghavendra Bhat <raghavendra@redhat.com> | 2014-12-12 22:10:54 -0800 | 
| commit | ceaa61bef43749f9ae8290a1fbe630aab9ed5943 (patch) | |
| tree | 029d47fcbaa6b452d95b70014c8133911d5052e4 /xlators/cluster/ec/src/ec-dir-write.c | |
| parent | e95a275f19faed24ef1fcd85bbb699302aea5a5b (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.
This is a backport of http://review.gluster.org/9098/
Change-Id: Ib44f25a1297849ebcbab839332f3b6359f275ebe
BUG: 1161066
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/9107
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Raghavendra Bhat <raghavendra@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 3d8055c40a7..6aa9badb76b 100644 --- a/xlators/cluster/ec/src/ec-dir-write.c +++ b/xlators/cluster/ec/src/ec-dir-write.c @@ -267,6 +267,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: @@ -550,6 +551,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: @@ -811,6 +813,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: @@ -1098,6 +1101,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: @@ -1362,6 +1366,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: @@ -1601,6 +1606,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: @@ -1856,6 +1862,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: @@ -2104,6 +2111,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:  | 
