diff options
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.c')
| -rw-r--r-- | xlators/cluster/ec/src/ec-common.c | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index e243b8ba5d9..dea987ef319 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -707,6 +707,19 @@ ec_child_select(ec_fop_data_t *fop)          return 0;      } +    if (!fop->parent && fop->lock_count && +        (fop->locks[0].update[EC_DATA_TXN] || +         fop->locks[0].update[EC_METADATA_TXN])) { +        if (ec->quorum_count && (num < ec->quorum_count)) { +            gf_msg(ec->xl->name, GF_LOG_ERROR, 0, EC_MSG_CHILDS_INSUFFICIENT, +                   "Insufficient available children " +                   "for this request (have %d, need " +                   "%d). %s", +                   num, ec->quorum_count, ec_msg_str(fop)); +            return 0; +        } +    } +      return 1;  }  | 
