From 84b2d080812247acf204468e8b25b09e65b464aa Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sun, 5 May 2019 21:17:24 +0530 Subject: 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#1709660 Change-Id: Idc6408968efaad897b95a5a52481c66e843d3fb8 Signed-off-by: Pranith Kumar K --- xlators/cluster/ec/src/ec-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster') 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: -- cgit