summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.c')
-rw-r--r--xlators/cluster/ec/src/ec-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
index 29ab66f374c..8ddda9b1370 100644
--- a/xlators/cluster/ec/src/ec-common.c
+++ b/xlators/cluster/ec/src/ec-common.c
@@ -2507,7 +2507,7 @@ ec_update_stripe(ec_t *ec, ec_stripe_list_t *stripe_cache, ec_stripe_t *stripe,
* size by the user, so we update the stripe if the write has
* modified at least one byte (meaning ec has written the full
* stripe). */
- if (base < fop->answer->op_ret) {
+ if (base < fop->answer->op_ret + fop->head) {
memcpy(stripe->data, fop->vector[0].iov_base + base,
ec->stripe_size);
list_move_tail(&stripe->lru, &stripe_cache->lru);