diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2014-11-08 21:07:09 +0100 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2014-12-18 06:36:43 -0800 |
commit | 2372a9ed54f6e30e3ac744e1daf8ec379dd236ae (patch) | |
tree | b93c44f0a169c32f0de0a7b6af33e01ffc7319fa /xlators/cluster/ec/src/ec-heal.c | |
parent | ad16db31df793d90a40fbfced82cae1c86d94658 (diff) |
ec: Remove O_APPEND from flags on create and open.
Allowing O_APPEND flag to pass through to the brick files
corrupts fragment contents because writes are not stored on
the desired place.
Write fop has been modified so that it uses current file
size as its write offset. This guarantees that all writes,
even those comming from different file descriptors and
clients, will write to the end of the file.
This is backport of http://review.gluster.org/9079/
Change-Id: I9f721f12217a98231fe52e344166d1c94172c272
BUG: 1161885
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/9080
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heal.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-heal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c index 73df4eab8f6..956d70a93fd 100644 --- a/xlators/cluster/ec/src/ec-heal.c +++ b/xlators/cluster/ec/src/ec-heal.c @@ -989,7 +989,7 @@ void ec_heal_reopen_fd(ec_heal_t * heal) } else { - flags = ctx_fd->flags & ~O_TRUNC; + flags = ctx_fd->flags & ~(O_TRUNC | O_APPEND); if ((flags & O_ACCMODE) == O_WRONLY) { flags &= ~O_ACCMODE; |