summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2019-05-05 21:17:24 +0530
committerPranith Kumar K <pkarampu@redhat.com>2019-05-05 21:46:47 +0530
commit920a9fe5cb5769470d31f5676ccb55dcdbd3a939 (patch)
tree48d6bcfae130f1ec457ec9a0a914fbec68e6148a /xlators/cluster
parent0d83a087ddf0fb6b843150c7b801bb10f6fd98db (diff)
cluster/ec: Reopen shouldn't happen with O_TRUNC
Problem: Doing re-open with O_TRUNC will truncate the fragment even when it is not needed needing extra heals Fix: At the time of re-open don't use O_TRUNC. fixes bz#1706603 Change-Id: Idc6408968efaad897b95a5a52481c66e843d3fb8 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster')
-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 1454ae23b23..b1ba5e96d3e 100644
--- a/xlators/cluster/ec/src/ec-common.c
+++ b/xlators/cluster/ec/src/ec-common.c
@@ -128,7 +128,7 @@ ec_fix_open(ec_fop_data_t *fop, uintptr_t mask)
} else {
ec_open(fop->frame, fop->xl, need_open,
EC_MINIMUM_ONE | EC_FOP_NO_PROPAGATE_ERROR, NULL, NULL, &loc,
- fop->fd->flags, fop->fd, NULL);
+ fop->fd->flags & (~O_TRUNC), fop->fd, NULL);
}
out: