cluster/ec: Handle unhandled states

This was leading to hangs when get_size_and_version fails

Change-Id: Iad9408c2dacc9a74594b8d2f94c95f402533b0f1
BUG: 1215265
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10390
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
This commit is contained in:
Pranith Kumar K 2015-04-27 00:00:08 +05:30 committed by Vijay Bellur
parent cd4e9abee1
commit 315364b78c

View File

@ -137,6 +137,7 @@ int32_t ec_manager_flush(ec_fop_data_t * fop, int32_t state)
case -EC_STATE_INIT:
case -EC_STATE_LOCK:
case -EC_STATE_DELAYED_START:
case -EC_STATE_DISPATCH:
case -EC_STATE_PREPARE_ANSWER:
case -EC_STATE_REPORT:
@ -392,6 +393,7 @@ int32_t ec_manager_fsync(ec_fop_data_t * fop, int32_t state)
case -EC_STATE_DISPATCH:
case -EC_STATE_PREPARE_ANSWER:
case -EC_STATE_REPORT:
case -EC_STATE_DELAYED_START:
GF_ASSERT(fop->error != 0);
if (fop->cbks.fsync != NULL)
@ -605,6 +607,7 @@ int32_t ec_manager_fsyncdir(ec_fop_data_t * fop, int32_t state)
case -EC_STATE_DISPATCH:
case -EC_STATE_PREPARE_ANSWER:
case -EC_STATE_REPORT:
case -EC_STATE_DELAYED_START:
GF_ASSERT(fop->error != 0);
if (fop->cbks.fsyncdir != NULL)